![Smarty Forum Index Smarty Forum Index](templates/smarty/images/phpbb2_logo.gif) |
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kklo Smarty n00b
Joined: 14 Jun 2013 Posts: 3
|
Posted: Fri Jun 14, 2013 1:04 pm Post subject: Problema com IF |
|
|
Boa tarde!
estou com um probleminha de If nesta rotina:
{if $GLOBALS.current_user.group.id != "Employer"}
<li><a href="{$GLOBALS.site_url}/find-jobs/" >[[Find Jobs]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Resume" >[[Post Resumes]]</a></li>
{/if}
{if $GLOBALS.current_user.group.id != "JobSeeker"}
<li><a href="{$GLOBALS.site_url}/search-resumes/" >[[Search Resumes]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Job" >[[Post Jobs]]</a></li>
{/if}
{if $GLOBALS.current_user.group.id != "Treinee"}
<li><a href="{$GLOBALS.site_url}/search-resumes/" >[[Search ResumesTT]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Treinee" >[[Post JobsTT]]</a></li>
{/if}
<li><a href="{$GLOBALS.site_url}/contact/" >[[Contact]]</a></li>
Não estou conseguindo fazer o grupo Treinee funcionar, alguma luz?
Obrigado |
|
Back to top |
|
migas Smarty Regular
Joined: 07 Apr 2004 Posts: 73 Location: Porto, Portugal
|
Posted: Fri Jun 12, 2015 10:47 am Post subject: |
|
|
O ideal seria usar em elseif tipo Switch em PHP.
Mas quase de certeza que o problema esta no conteúdo da variável.
Code: |
{if $GLOBALS.current_user.group.id != "Employer"}
<li><a href="{$GLOBALS.site_url}/find-jobs/" >[[Find Jobs]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Resume" >[[Post Resumes]]</a></li>
{elseif $GLOBALS.current_user.group.id != "JobSeeker"}
<li><a href="{$GLOBALS.site_url}/search-resumes/" >[[Search Resumes]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Job" >[[Post Jobs]]</a></li>
{elseif $GLOBALS.current_user.group.id != "Treinee"}
<li><a href="{$GLOBALS.site_url}/search-resumes/" >[[Search ResumesTT]]</a></li>
<li><a href="{$GLOBALS.site_url}/add-listing/?listing_type_id=Treinee" >[[Post JobsTT]]</a></li>
{/if}
<li><a href="{$GLOBALS.site_url}/contact/" >[[Contact]]</a></li> |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|