Forums / Setup & design / section id carries over after logout

section id carries over after logout

Author Message

Hilary C.

Friday 16 July 2004 1:52:47 pm

Hi all,

I have a dynamic menu system, using a switch to see what section id the user's on and then pulling the appropriate menu include file. This works well within the site, after logging in.

But I'm noticing that when I log out, the section id from the last page I was on carries over to the login page, so the last menu shows up again on the login page, instead of the login page's menu (which correlates to the default case in the switch).

Code is below.

Any ideas how I can get the section ID to stop carrying over, or else a workaround?

{let iamhere=$DesignKeys:used.section}

{switch match=$iamhere}
{case match=10}
{include uri="design:main_rightnav.tpl"}
{/case}
{case match=19}
{include uri="design:company_rightnav.tpl"}
{/case}
{case}
{include uri="design:login_page_rightnav.tpl"}
{/case}
{/switch}
{/let}

Hilary C.

Monday 19 July 2004 9:49:09 am

I haven't figured out a real solution, but I did find a workaround - I used this code in site.ini.append.php to just change the redirect from the logout link to a static logout page.

[UserSettings]
LogoutRedirect=http://www.domain.org/logout.html

Paul Forsyth

Monday 19 July 2004 11:10:59 am

It is probably being cached, which is why you continue to see it. Try switching cache off to see if this is the case.

Are you using pagelayout.tpl or an included tpl? If its an included tpl try adding this line to the top:

{set-block scope=root variable=cache_ttl}0{/set-block}

This will stop only that template from being cached.

paul

--
http://www.visionwt.com

Hilary C.

Monday 19 July 2004 12:57:59 pm

Thanks, Paul, but the problem doesn't seem to be caching. I turned off my viewcaching (templatecaching was already disabled) and it made no difference. I also tried the cache-block line of code, just in case, and it didn't make any difference either. Any other ideas? -looks hopeful-

Paul Forsyth

Monday 19 July 2004 1:33:35 pm

Hmmm, if it isnt cached then its odd behaviour. As you rightly said on your other thread there is no section id for the login page.

Is this thread the same as the other, btw? If so we should continue on just one.

paul

--
http://www.visionwt.com