[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 *Title: Improved custom attributes. 2 3 *Documentation: 4 5 In the past only some tags, like 'embed' could have custom attributes. 6 Now every ezxmltext tag can have custom attributes, and the list of available 7 custom attributes is set with content.ini setting: 8 9 content.ini [tagname].CustomAttributes 10 11 This is an array that contains attributes names. For custom tags 'tagname' is 12 a name of the tag, for example 'factbox'. 13 14 To access custom attribute's values in tag's template, use variable that have 15 the same name. 16 17 *Important: 18 19 You can get warning when you try to edit existing objects containing tags with 20 custom attributes if they are not added to the list. To add all existing 21 attributes to content.ini automatically run the following script: 22 23 update/common/scripts/3.9/correctxmltext.php 24 25 26 *Example: 27 28 If you want to add 'summary' attribute to the 'table' element, 29 add the following setting to content.ini.append: 30 31 [table] 32 CustomAttributes[] 33 CustomAttributes[]=summary 34 35 36 Now you can enter in the XML text block input field: 37 38 <table summary='123> 39 ... 40 41 42 In the template table.tpl: 43 44 summary:{$summary} 45 46 47 *Example for a custom tag: 48 49 [factbox] 50 CustomAttributes[] 51 CustomAttributes[]=summary
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |