New page vars with PageUtil class are really great staff.
But there is one thing missing - old additional_header plugin allows us to add to header everything what we needed. This was specially helpful when need to add Internet Explorer conditional comments (e.g. to apply for ie dedicated stylesheet).
If I'm not wrong whit PageUtil we cannot do this. We cant ad raw text - but it is added inside body tag. To head we can add only stylesheets, scripts and so on - but without conditional comments.
Would it possible to add this feature to page util? Or maybe there is some way to add conditional comments to header using PageUtil?
Thanks in advance for replay!
Greetings
--
Polish Zikula Team
Bianor Works - my Zikula works on CoZi
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
page vars (with PageUtil class) vs additional_header
-
- Rank: Team Member
- Registered: Apr 07, 2005
- Last visit: Jan 18, 2010
- Posts: 228
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
-
- Rank: Team Member
- Registered: Apr 07, 2005
- Last visit: Jan 18, 2010
- Posts: 228
-
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
and in 0.764 how to do it?
additional_header launch me an error when i try to insert text/css with IE conditionals...
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Team Member
- Registered: Apr 07, 2005
- Last visit: Jan 18, 2010
- Posts: 228
With page vars you can add conditional comments this way:
Code
<!--[pnpageaddvar name="rawtext" value=$smarty.ldelim|cat:'if IE]> <li-nk rel="stylesheet" href="path_to_eg_stylesheet/ie-fixes.css" type="text/css"></li-nk><![endif'|cat:$smarty.rdelim]-->
With old additional_header:
Code
<!--[add_additional_header header=$smarty.ldelim|cat:'if IE]><li-nk rel="stylesheet" href="path_to_eg_stylesheet/ie-fixes.css" type="text/css"></li-nk<![endif'|cat:$smarty.rdelim]-->
Both examples produce:
Code
<!--[if IE]>
<li-nk rel="stylesheet" href="path_to_eg_stylesheet/ie-fixes.css" type="text/css"></li-nk><![endif]-->
Short explanation: we cannot write the comment in normal way, because tag to open comment is reserved by Smarty (actually by pnRender) as delimiter.
For this purpose we can use one of Smarty reserved var: $smarty.ldelim nad $smarty.rdelim.
More: http://smarty.php.net/manual/en/language.function.ldelim.php
Edit: of course in code-blocks all "li-nk" have to be replaced by "link" (bbcode is cuting link tags
)
edited by: Jusuff, Jul 31, 2007 - 09:13 PM
--
Polish Zikula Team
Bianor Works - my Zikula works on CoZi
- Moderated by:
- Support
