Jump to content

Smarty help \ {$if loggedin} {else} {/if}


ethersec

Recommended Posts

Wondering if anyone can help on this, basically just want anyone that hits the default whmcs homepage (index.php) to have to login to see anything. This is what I have in homepage.tpl..

 

{if $loggedin}
<table>
" table data "
</table>
{else}
<!-- not sure about this part -->
{include file="secur_portal/login.tpl"}
{/if}

 

...this does show the login page however after loging in it still only shows the login page and not the {if $loggedin} table data..ie: knowledge base, serverstatus, announcements, ...?

 

I should note that I also have a {if $loggedin} in the header.tpl that controls the client menu that works fine. Now im just trying to add in this for the home page data.

 

Any help would be greatly appreciated!

 

Thanks.

Link to comment
Share on other sites

Wondering if anyone can help on this, basically just want anyone that hits the default whmcs homepage (index.php) to have to login to see anything. This is what I have in homepage.tpl..

 

{if $loggedin}
<table>
" table data "
</table>
{else}
<!-- not sure about this part -->
{include file="secur_portal/login.tpl"}
{/if}

 

...this does show the login page however after loging in it still only shows the login page and not the {if $loggedin} table data..ie: knowledge base, serverstatus, announcements, ...?

 

I should note that I also have a {if $loggedin} in the header.tpl that controls the client menu that works fine. Now im just trying to add in this for the home page data.

 

Any help would be greatly appreciated!

 

Thanks.

 

--------------------------------------

 

I should correct/clarify that it does not appear to actually login as the header.tpl {$if loggedin} client menu function (that works on it own) does not work with the homepage.tpl {$if loggedin} bit added now.

 

again, Thanks..

Link to comment
Share on other sites

{if $loggedin}XXXX{else}ZZZZ{/if} will work in the homepage.tpl

If its not then maybe you might have an un-closed {/if} from when you installed the client menu

That would probably explain why the menu doesn't work on the homepage correctly.

 

Double check your client menu tags.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated