ScreenName in Dynamic Title
Posted: 08 February 2011 06:25 PM   [ Ignore ]
Wallflower
Rank
Total Posts:  1
Joined  2011-02-02

Dear all

I would like to add the Screen Name to the Title. The following approach is not working:

{exp:safecracker channel="xxx" dynamic_title="[screen_name]: [note]" return=""

With the following wordaround, it is possible (even if no “name” field really exists for this channel):

{exp:safecracker channel="xxx" dynamic_title="[name]: [note]" return=""}
<input type="hidden" name="name" id="name" value="{screen_name}"  /> 

But is there perhaps a more efficient solution?

Thanks, MISC

Profile
 
 
Posted: 08 February 2011 10:25 PM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

This should work: (php enabled on input)

{exp:safecracker channel="xxx" dynamic_title="<?php echo $this->EE->session->userdata('screen_name'); ?>: [note]" return="site/something"
Profile