Jump to content

Removing sidebar only on "landing page" of custom template?


adeave

Recommended Posts

Hi All, Hopefully someone can save me the additional hours searching : )

 

I need help removing the the sidebar/nav of a custom template. if it helps the template i am customizing is called letpress. I would like to remove the sidebar/nav only for the homepage. ( * I am however okay with the sidebar shown on other pages and order pages after the user logs into their account)

 

 

Thanks a bunch.

A

Link to comment
Share on other sites

what you will need to do is wrap an {if} statement in the sidebar to check if it's the homepage - if so, don't show the sidebar, otherwise show it.

 

there should be a line in the code as below in footer.tpl

 

<!-- BEGIN SIDEBAR -->

either just before or after, enter the following...

 

{if $filename neq "index"}

and then add {/if} before or after the line below...

<!-- END SIDEBAR -->

the sidebar template code already checks whether the user is logged in and displays various sections of the sidebar depending on the answer... but you could change the above if line to see whether is user is logged in - i'm assuming if they are, you don't mind them seeing the sidebar.

 

{if $loggedin or $filename neq "index"}
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