How to use the custom tag's "insert attribute"

Author Message

Brendan Pike

Friday 08 October 2004 1:42:47 am

Could someone show me how to use the insert attribute found in the Online Editors custom tag. Can this be used for example to allow users to define font colors by themselves? How should the template be built to utise this?

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

K259

Friday 08 October 2004 2:20:41 am

I also would appreciate that people who have used this custom tag to something special and usefull, publish their code at the "Contributions" section with urls to the examples.

Would be a great way to get new ideas for the use of this functionallity.

And Brendan, yes, you can make custom tags the way you want with a lot of different code..
- you can do a fetch from the database and show the most active users in the forum through a template (ez.no uses a custom tag for this here: http://www.ez.no/community/stat)
- you can make factboxes as standard in the demo
- you can make hr's, have a custom tag for your company logo, so that you don't have to upload logo, related it to the page which is too much work
++++
- you can use variables (input fields) where the users themselves decide the values.

Z

Brendan Pike

Monday 11 October 2004 12:44:18 am

> you can use variables (input fields) where the users themselves decide the values.

I understand all your earlier points but it's your last point I would like some further details on, I have experimented without success. Does the template need to be written to support these values? Could someone show me please.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Wenyue Yu

Thursday 14 October 2004 1:04:24 am

Hi,

A simple example to change standard template factbox.tpl, supposed that you have added attribute 'color':

<div align="center">
<table bgcolor="#eeeeee">
<tr>
    <td>
    <font color={$color"}>
    {$content}
    </font>
    </td>
</tr>
</table>
</div>

The point is that all added attribute will be available in the template and you can use these to make complex template.

Regards,
wenyue

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:39:28
Script start
Timing: Jan 18 2025 19:39:28
Module start 'layout'
Timing: Jan 18 2025 19:39:28
Module start 'content'
Timing: Jan 18 2025 19:39:28
Module end 'content'
Timing: Jan 18 2025 19:39:28
Script end

Main resources:

Total runtime0.6552 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1563152.6406
Module start 'layout' 0.00560.0031 741.796939.4766
Module start 'content' 0.00870.6451 781.2734541.9766
Module end 'content' 0.65380.0014 1,323.250012.1250
Script end 0.6552  1,335.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5170160.0002
Check MTime0.00140.2084160.0001
Mysql Total
Database connection0.00070.111610.0007
Mysqli_queries0.610293.1308620.0098
Looping result0.00060.0843600.0000
Template Total0.627295.720.3136
Template load0.00210.315320.0010
Template processing0.625195.396920.3125
Template load and register function0.00010.022610.0001
states
state_id_array0.00080.117410.0008
state_identifier_array0.00080.115420.0004
Override
Cache load0.00170.2565240.0001
Sytem overhead
Fetch class attribute can translate value0.00080.125030.0003
Fetch class attribute name0.00100.154240.0003
XML
Image XML parsing0.00030.045030.0001
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00060.0960100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs