Custom tags
In addition to the default tags described above, the "XML block" datatype makes it possible to use custom tags. A custom tag can be used both as a block or an inline element. Custom tags must be specified using the "AvailableCustomTags[]" array in the [CustomTagSettings] block within an override for the "content.ini" configuration file. When the XML is rendered, the contents of a custom tag will be replaced by a custom template. The name of the template must be specified using the "name" parameter. Example of usage:
<custom name="template_name" [custom_parameter="value" [...] ]> The quick brown fox jumps over the lazy dog. </custom>
The custom tag in the example above will be replaced by a template called "template_name.tpl". This template must be located in the following directory within the current design: "/templates/content/datatype/view/ezxmltags/" (or one of the fallback designs). It is also possible to create an override template. The contents of the tag will be available in the "$content" variable within the inserted template.
The custom parameters are optional. Their names must be specified using the "CustomAttributes[]" array within an override for the "content.ini" configuration file. When used, a custom parameter will be available as a template variable with the same name as it was specified in the tag itself.
Balazs Halasy (10/03/2005 11:49 am)
Balazs Halasy (18/07/2007 6:08 pm)
Comments
Custom Tags / Online Editor
Friday 19 August 2005 6:31:56 am
David Moser
But when I use the custom tags inside the Online Editor there only appear a button with a question mark. I would like to display the custom tag like it is done for the factbox tag.
Here the code from my content.ini file:
[CustomTagSettings]
AvailableCustomTags[]=mytag
IsInline[mytag]=true
And here the code from mytag.tpl
<div align="center">
<table bgcolor="#eeeeee">
<tr>
<td>
{$content}
</td>
</tr>
</table>
</div>
Any ideas?
custom tags have to also exist in admin siteaccess
Wednesday 12 October 2005 9:32:11 am
Matthew Carroll
How to make custom tags (classes) visible in the online editor
Friday 28 July 2006 9:56:21 am
Helle Andersen
[CustomTagSettings]
AvailableCustomTags[]=dobbeltbreak
IsInline[dobbeltbreak]=true
[table]
AvailableClasses[]=tableBeige
etc.
This works fine in the public pages, but the color of the table is not visible in the editor. I have tried to copy everything into both the content.ini both in /admin, our local admin, and into the content.ini for the editor in /var/www/ezpublish/extension/ezdhtml/settings, but to no effect. I have also adden the line
IsInline[tableBeige]=true but this also has no effect.
In the editor the table is still without color. Any suggestions ?
Re: How to make custom tags (classes) visible in the online editor
Monday 31 July 2006 8:52:38 am
Helle Andersen
Content.ini - location ?
Wednesday 02 August 2006 8:25:36 am
Helle Andersen
* in your own admin
* in the (ez) admin
* in /settings/override/
And what about the content.ini in the editor extention in /var/www/ezpublish/extension/ezdhtml/settings
How many content.ini are actually needed and which should be edited to make things work