Loading...
 
Features / Usability

Features / Usability


Hide search in header?

posts: 13

Hi there,
I put the code from the search box tpl into header.tpl and removed the module tag, so the search is no longer a module, it's just a form.

But I don't want someone who hasn't logged into the site to search. Yet the search does show up on the login (home) page.

Now that the search is not a module, is there a way to make an if statement that will check and see if user is registered before search will show up in the header?

Many thanks in advance. biggrin

kittykit

posts: 13

when I wrap the form in
{if $user eq "y"} {/if} it doesn't show while I'm admin. Do I have this wrong?

thanks a thousand times over. biggrin

posts: 17

i use {if $user} {/if}

ewan



posts: 13
Oh...thanks Damian. I thought user = y means the user is on record. I changed it to a simple if $user and it works like a dream now. Many thanks again. razz