Thursday 23 November 2006 7:38:59 am
Hi, I want to understand how do work custom tags. So I'm trying to create an "underline" tag with a class. In settings/siteaccess/ezwebin_admin/content.ini.append.php I put:
[CustomTagSettings]
# You can use custom tags through the <custom> tag in XML fields.
# Example: <custom name="sub">Sub text</custom>
AvailableCustomTags[]=underline
IsInline[underline]=true
[underline]
AvailableClasses[]
AvailableClasses[]=red
AllowEmpty=false
CustomAttributes[]
I created a customtag template: design/standard/templates/content/datatype/view/ezxmltags/underline.tpl which contains:
<u>{$content}</u>
And I created a class in extension/ezwebin/design/ezwebin/stylesheets/css_moi.css (I'm using a 3.9rc1):
.red {
color: red;
font-size: 2em;
}
Well, I think all is right.
In OE I can see my "underline" customtag but when I close the tag edit window the text is not undelined but it is well underlined when I publish the article. eg: this is what I see in OE before publishing:
This is my undelined text example.
After I publish the article, I can see in the view mode of the admin interface: This is an <u>underlined</u> text example. and in the public site:
This is an
<u>underlined</u> text example. So, I have some questions:
1°/ Why the text is not underlined in OE ? 2°/ Why the source code of the public page contains <p></p> tags around the underlined text ?
<p>
This is an
</p>
<u>underlined</u>
<p>
text example.
</p>
3°/ What must I do to use the class "red" with my tag ? Regards Pascal
Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish
|