- Moderated by:
- Support
-
- rank:
-
Helper
- registered:
- March 2005
- Status:
- offline
- last visit:
- 04.12.08
- Posts:
- 399
Code
<div id="theme_navigation_bar">
<ul>
<!--[if pnuserloggedin($loggedin) eq 1]--><li><a href="<!--[pngetbaseurl]-->">Home</a></li>
<li<!--[if $module eq 'Content']--> class="selected"<!--[/if]-->><a href="<!--[pnmodurl modname=Content&func=view&pid=1]-->">What We do</a></li>
<li<!--[if $module eq 'Profile']--> class="selected"<!--[/if]-->><a href="<!--[pnmodurl modname=Profile]-->"><!--[pnml name="_YOURACCOUNT"]--></a></li>
<!--[else]-->
<li><a href="<!--[pngetbaseurl]-->">Home</a></li>
<li<!--[if $module eq 'Search']--> class="selected"<!--[/if]-->><a href="<!--[pnmodurl modname=Search]-->"><!--[pnml name="_SEARCH"]--></a></li>
<li<!--[if $module eq 'Profile']--> class="selected"<!--[/if]-->><a href="<!--[pnmodurl modname=Profile]-->"><!--[pnml name="_YOURACCOUNT"]--></a></li>
<!--[/if]-->
</ul>
</div>
Im trying to change a navigation bar based on if the user is logged in. This is working from a modified Andreas theme. I get the following Smarty error at line 28, which is at thesection:Code
<!--[if pnuserloggedin($loggedin) eq 1]--><
System Error
Critical error
An unknown error has occured. The following error message was returned by the system
Smarty error: [in master.htm line 28]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1547) (in file C:\Program Files\xampp\htdocs\dco\includes\classes\Smarty\Smarty.class.php on line 1095)
HELP!!!, I know this is something simple and I'm a total n00b at Smarty.
--
[ stevencopley.com ] -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
The problem is the pnuserloggedin($loggedin) part of your template logic. You're mixing the use of template functions and template variables.
If using the pnuserloggedin tag you'd use it like
Code
<!--[pnuserloggedin assign=loggedin]-->
<!--[if $loggedin eq true]-->
...
<!--[/if]-->
However you don't need to do this since we assign you the result of pnuserloggedin by default. See this list of default… template variables. So you can simply use
Code
<!--[if $loggedin eq true]-->
...
<!--[/if]-->
See our Theme authoring documentation for additional information on the theming system.
-Mark -
- rank:
-
Helper
- registered:
- March 2005
- Status:
- offline
- last visit:
- 04.12.08
- Posts:
- 399
-
- rank:
-
Helper
- registered:
- March 2005
- Status:
- offline
- last visit:
- 04.12.08
- Posts:
- 399
Code
<!--[if $loggedin eq true]-->...<!--[/if]-->
Mark, this did not work. I looked through the links and based on what I've seen, that would be the correct syntax, but it simply is not doing what it should be. Am I missing something? I can send someone the entire template to look at if needed.
--
[ stevencopley.com ] -
- rank:
-
Team Member
- registered:
- December 2003
- Status:
- offline
- last visit:
- 04.12.08
- Posts:
- 2992
As far as I can see the loggedin part should work...
Code
<!--[pnmodurl modname=Content&func=view&pid=1]-->
I do not think you can do that.... modname is Content not the complete path.
Code
<!--[pnmodurl modname="Content" type="user" func="view" pid="1"]-->
--
David Pahl
Zikula Support Team -
- rank:
-
Helper
- registered:
- July 2004
- Status:
- offline
- last visit:
- 29.11.08
- Posts:
- 113
AmmoDump is right.
Please look here, too: http://community.postnuke.com/module-Forum-viewtopic-topic-52978-start-0.htm#pid233327
--
Carsten-volmer.de
Saga-Treff.de
