Forums / General / How to use the custom tag's "insert attribute"

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

eZ debug

Timing: Jan 18 2025 16:26:01
Script start
Timing: Jan 18 2025 16:26:01
Module start 'content'
Timing: Jan 18 2025 16:26:02
Module end 'content'
Timing: Jan 18 2025 16:26:02
Script end

Main resources:

Total runtime0.8320 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 587.8359180.8203
Module start 'content' 0.00560.6811 768.6563547.0703
Module end 'content' 0.68670.1451 1,315.7266334.1016
Script end 0.8319  1,649.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5296210.0002
Check MTime0.00160.1925210.0001
Mysql Total
Database connection0.00070.083410.0007
Mysqli_queries0.756990.97571990.0038
Looping result0.00340.40781970.0000
Template Total0.802996.520.4014
Template load0.00240.293720.0012
Template processing0.800496.209820.4002
Template load and register function0.00030.039810.0003
states
state_id_array0.00080.090510.0008
state_identifier_array0.00080.092420.0004
Override
Cache load0.00180.2220240.0001
Sytem overhead
Fetch class attribute can translate value0.00150.182640.0004
Fetch class attribute name0.00130.152340.0003
XML
Image XML parsing0.00060.074940.0002
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00290.3523210.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs