|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ChrisFah Smarty Pro
Joined: 02 Nov 2009 Posts: 159 Location: Traun, Austria
|
Posted: Tue Apr 10, 2012 6:51 pm Post subject: Session_id in links at cached pages |
|
|
Hi guys,
I am looking for a way to handle links with session_ids at cached pages.
Example:
Code: | <a href="page2.php?session_id=123456789">page2</a> |
In former projects I used a "dummy-session_id" like ?session=[SESSION] and replaced it with real session id (for user without cookie support) or deleted it if not necessary (with cookies turned on) with output_filter when using $smarty->display().
Is there a better way to support session in cached pages when user does not accept cookies ????
Lg, Chris |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Apr 10, 2012 8:02 pm Post subject: |
|
|
What's about
Code: | <a href="page2.php{$session nocache}">page2</a> |
and
Code: | $smarty->assign('session','?session_id=123456789');
or
$smarty->assign('session',''); |
|
|
Back to top |
|
ChrisFah Smarty Pro
Joined: 02 Nov 2009 Posts: 159 Location: Traun, Austria
|
Posted: Tue Apr 10, 2012 10:36 pm Post subject: |
|
|
Besser!
Was aber, wenn der Link bereits im PHP Teil gebildet wird und als fertiger "string" an Smarty assignt wird? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Apr 10, 2012 11:01 pm Post subject: |
|
|
Kannst doch den gesamten link optional zusammen bauen, assignen und nocache im template ausgeben. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|