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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:15:05
Script start
Timing: Jan 18 2025 16:15:05
Module start 'layout'
Timing: Jan 18 2025 16:15:05
Module start 'content'
Timing: Jan 18 2025 16:15:05
Module end 'content'
Timing: Jan 18 2025 16:15:05
Script end

Main resources:

Total runtime0.0159 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.0313152.6406
Module start 'layout' 0.00570.0034 740.671939.4766
Module start 'content' 0.00910.0049 780.148493.2266
Module end 'content' 0.01400.0019 873.375034.3047
Script end 0.0159  907.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002716.8766140.0002
Check MTime0.00127.3142140.0001
Mysql Total
Database connection0.00106.118810.0010
Mysqli_queries0.002515.724730.0008
Looping result0.00000.131810.0000
Template Total0.00159.210.0015
Template load0.00074.704810.0007
Template processing0.00074.504110.0007
Override
Cache load0.00053.166510.0005
General
dbfile0.00021.506980.0000
String conversion0.00000.068940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs