hiding the 'login' link

bowersinit

Joined: 2009-05-13
Posts: 5
Posted: Wed, 2009-05-13 15:38

im trying to customisie the system links, basically i dont want guests to see the login link, but once a user is logged in i want the system links to show, eg. "Site Admin | Logout | Your Account"

i have tried messing about with the SystemLinks.tpl in the core directory, but i cant seem to find any kind of 'user logged in' function.

idealy what would happen is this

if user is logged in, show system links
else show nothing

thanks in advance

Tommy

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-05-13 16:25
{if $user.isRegisteredUser}
	<div class="gbSystemLinks">
	  {g->block type="core.SystemLinks"
		    order="core.SiteAdmin core.YourAccount core.Login core.Logout"
		    othersAt=4}
	</div>
{/if}

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
bowersinit

Joined: 2009-05-13
Posts: 5
Posted: Wed, 2009-05-13 17:36

Amazing, just what the doctor ordered, cheers Dave!

 
friz

Joined: 2010-07-15
Posts: 2
Posted: Thu, 2010-07-15 17:31

Hi,

that's exactly what I need.
But in which file do I add/edit this code??
I've looked in SystemLinks.tpl, but didn't find anything. Adding it to this file didn't work either.

Thank you in advance!!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2010-07-15 23:54

theme.tpl

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
friz

Joined: 2010-07-15
Posts: 2
Posted: Fri, 2010-07-16 01:07

Thx! But doesn't seem to work. Could this be because I use another version (2.3.1)? Another theme (x_treme)?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2010-07-16 03:05
Quote:
Another theme (x_treme)?

Yes I have never tried that theme.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team