Code Help

Dazed
Dazed
@dazed
12 years ago
1,022 posts
The below menu link will display upon the first login but then after leaving the page, it disappears. Is there something I need to retain the session?

Thanks

 {if jrUser_is_logged_in()}
                   {if $profile_quota_id==19}
                   <li><a href="{$jamroom_url}/site">Mixposure site</a></li>
                    {/if}
                     {/if}
                    

updated by @dazed: 12/10/13 04:33:22AM
douglas
@douglas
12 years ago
2,797 posts
Where are you putting this?

And do you have a quota with the ID of 19?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Hey Douglas - It is in a menu but I use a different menu then the default version.

When I login as a user in quota 19 the link is there. I can click it and I go to the page. When I go back to the index, it is no longer there. So it seems that my menu is not reinitializing.
brian
@brian
12 years ago
10,148 posts
We use smarty code like you've posted pretty much all over the place, so I am going to guess the problem is in code surrounding it (or loading it). You mention it is a menu, so my guess is it is menu that is being loaded by Javascript? What does firebug (or other javascript console) show when using it? Do you get Javascript errors? Those will help narrow down the issue.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
12 years ago
2,584 posts
If this is for a user link , try checking $_user.profile_quota_id instead.

Or this:
             
{if jrUser_in_quota(19)}
                   <li><a href="{$jamroom_url}/site">Mixposure site</a></li>
{/if}



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Thanks all. I had no errors but Steve`s code is sticking so will use it. Thanks everyone.
michael
@michael
12 years ago
7,772 posts
Wanna write some docs steve? great tip, I just learnt something. ;)