Page 1 of 1

[Solved] User-defined Tags don't work

Posted: Mon Sep 08, 2008 5:14 pm
by cwm73
i'm trying to add some User-defined Tags to my template, but keep getting an error.

i add this tag to my template: {history}

and get this error:

Code: Select all

string(118) "Smarty error: [in template:21 line 99]: syntax error: unrecognized tag 'history' (Smarty_Compiler.class.php, line 590)"
???


CMS 1.4.1, PHP 5.1.6, Apache/2.2.3 (CentOS), MySQL 5.0.45

Re: custom tags don't work

Posted: Mon Sep 08, 2008 5:39 pm
by Jean le Chauve
smarty don't recognize this tag. You must first define this tag into an UDT.
http://wiki.cmsmadesimple.org/index.php ... fined_Tags

Re: custom tags don't work

Posted: Mon Sep 08, 2008 5:53 pm
by cwm73
thanks for the replay, but not quite what i'm looking for.

i want to add the {history} tag to my template, then in my Edit Page Editor, a 'history' field would appear and i would be able to add text that would appear on my site, similar to {content} / Content.

make sense?

Re: custom tags don't work

Posted: Mon Sep 08, 2008 6:11 pm
by alby
cwm73 wrote: i want to add the {history} tag to my template, then in my Edit Page Editor, a 'history' field would appear and i would be able to add text that would appear on my site, similar to {content} / Content.

make sense?
No, tag it's for plugin or UDT (infact {content} is plugins/function.content.lang)
If you want add another box for content look in help of content tag for block param (and online if you want an input only), ie:
{content block='history'}

Alby

Re: User-defined Tags don't work

Posted: Mon Sep 08, 2008 7:51 pm
by cwm73
that's it! thanks again.

{content block='userdefinedtag'}