show some content only for login users?

Discussion in 'Auto Classifieds Script' started by tvpowerman, Oct 21, 2017.

  1. tvpowerman

    tvpowerman New Member

    Hi
    how to show some content only for login users?

    this way work on render-menu.tpl page

    {if 'account' == $menu.name && $member && $core.config.members_enabled}

    {/if}

    but not work on layout.tpl give error

    Notice: Undefined index: menu
    on line 125 in file includes/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code


    how to make it work on layout.tpl page?
  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hello @tvpowerman !

    In any *.tpl you can do like this:
    Code (Text):

    {if $member && $core.config.members_enabled}
      <!-- content only for logged in members -->
    {/if}
     
    Thanks!

Share This Page