By: Pablo Impallari
Date: 2006-09-13
Time: 10:14
|
Cach with login systemHi:
In many sites, I have 2 links in the headers. 1) Login 2) Register After de user has logged in, those 2 links chages to: 1) Hello "XXXXXX" User 2) LogOut So, te question is: How can i have cache the rest of the page, but not this login widget, that must be independet from the rest of the content. Sorry about my english, im from Argentina. By by |
||
By: TomH
Date: 2006-09-13
Time: 19:39
|
Re: Cach with login systemHi,
If I were doing I would make a parent page that was not cached and which holds the logon elements, and then -- inside that HTML template -- I would place a subtemplate that would be the cached content. Kind of like this... Parent page like index.HTML
Hope that helps get you started, TomH |
||
By: Pablo Impallari
Date: 2006-09-14
Time: 01:28
|
Re: Cach with login systemIs there any other way to do it whitout breakign the main template in subtemplates?
I dont want to end up whit a lot of subtmeplates for every page on the site. |
||
By: TomH
Date: 2006-09-14
Time: 10:57
|
Re: Cach with login systemI see it as only one small page/script that is a wrapper that includes the login widget and the one subtemplate that is the rest of the content.
And that wrapper will only change if you need to change the login widget. So you would only be worlking with the one main content subtemplate for all other things that you needed to code. You can look at my TBS caching examples for some more ideas on caching content -- the "model 3" example is a page that is ALL in one script. In your case it would be analagous to the main content and would be inside of your login wrapper script. Also see the Meta123 CMS prototype -- 90% of the content views/pages are generaated from the parent script's db queries. See examples at http://tomhenry.us/tbs3/ HTH, TomH |
||
By: Pablo Impallari
Date: 2006-09-15
Time: 06:29
|
Re: Cach with login systemThank so much.
The examples are great! |