Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

accessing TransientKey in a Smarty template?

codegruntcodegrunt New
edited January 2011 in Vanilla 2.0 - 2.8
Howdy. I am currently working through theming the discussions index view. In "applications/vanilla/views/discussion/index.php" there is the following section that creates the bookmark link:

// Bookmark link echo Anchor( '<span>*</span>', '/vanilla/discussion/bookmark/'.$this->Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($this->SelfUrl), 'Bookmark' . ($this->Discussion->Bookmarked == '1' ? ' Bookmarked' : ''), array('title' => T($this->Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark')) );

The problem with replicating this in a Smarty template is that it does not appear that "$Session->TransientKey()" (or the Session object istself) is passed to Smarty, at least from what I can tell from putting {debug} into the "index.tpl" file or trying to access $Session.

Does anyone know if there is a way to get the TransientKey value within a Smarty template?

Sign In or Register to comment.