Page 1 of 1
user defined tags - add common tags?
Posted: Mon Oct 06, 2008 6:12 pm
by cwm73
hi there,
how do you add common tags to user defined tags?
this is what i have:
echo'For information regarding Licensing and/or Production rights for
';
echo'{title} please use the form below, or use our contact page.';
and where the {title} is, i'd obviously want to page title to appear. what do i need to do to make this work, with a minimum of code (i'm more of a designer)?
thanks in advance
Re: user defined tags - add common tags?
Posted: Mon Oct 06, 2008 10:57 pm
by Augustas
I guess like this
Code: Select all
global $gCms;
$my_title = $gCms->variables['title'];
Re: user defined tags - add common tags?
Posted: Tue Oct 07, 2008 1:24 am
by cwm73
thanks, but this doesn't work:
Code: Select all
global $gCms;
$my_title = $gCms->variables['title'];
echo'<p>For information regarding Licensing and/or Production rights for <br />';
echo'{title} please use the form below, or use our <a href="contact.html">contact</a> page.</p>';
again, i'm not really a programmer
??
Re: user defined tags - add common tags?
Posted: Tue Oct 07, 2008 1:51 am
by Augustas
Actually, use Global Content Block to implement this. Just create a new GCB with text
For information regarding Licensing and/or Production rights for
{title} please use the form below, or use our contact page.
Re: user defined tags - add common tags?
Posted: Tue Oct 07, 2008 11:43 am
by Nick Smart
cwm73 wrote:
thanks, but this doesn't work:
Code: Select all
global $gCms;
$my_title = $gCms->variables['title'];
echo'<p>For information regarding Licensing and/or Production rights for <br />';
echo'{title} please use the form below, or use our <a href="contact.html">contact</a> page.</p>';
If you do want to implement it as a UDT you'll need:
Code: Select all
global $gCms;
$my_title = $gCms->variables['title'];
echo'<p>For information regarding Licensing and/or Production rights for <br />';
echo $my_title . ' please use the form below, or use our <a href="contact.html">contact</a> page.</p>';
Nick