Including extension templates

Author Message

David Jones

Thursday 25 January 2007 3:23:54 am

I want to include a template, from an extension, in my pagelayout.tpl

I have tried this:

{include uri="design:register_subscription.tpl"}

but the contents of the template do not appear.

The template itself sits here

extension/ezxnewsletter/design/standard/templates/ezxnewsletter/register_subscription.tpl

How do I / Can I include this?

Many thanks

Xavier Dutoit

Thursday 25 January 2007 5:45:09 am

The structure under your design in the extension should be exactly the same as the one you'd put under the regular design.

So to call it as it is you should :
{include uri="design:ezxnewsletter/register_subscription.tpl"}

Check if your extension settings add itself as one providing templates

extension/ezxnewsletter/settings/design.ini.append.php


[ExtensionSettings]
DesignExtensions[]=ezxnewsletter

http://www.sydesy.com

David Jones

Thursday 25 January 2007 9:37:07 am

thats great.

Thank you

Rob Borley

Thursday 25 January 2007 9:59:13 am

I've done something similar to this and I assume that you are heading in the same direction.

I've managed to included the registration form in a template and used that template to override the node\full template of a new class (Newsletter Sign up)

What I can work out is how to pass it the id of the list I wish to sign up to.

{def $base_uri=concat( '/newsletter/register_subscription/', $subscriptionList.url_alias )}

That is th action of the form. But I can't work out how to set it.

Ideally I would like a drop down (or something) in my class definintion to set the list for the form to subscribe too.

If i have to set it in the template itself though that's ok.

Any ideas?

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:44
Script start
Timing: Jan 18 2025 19:39:44
Module start 'layout'
Timing: Jan 18 2025 19:39:44
Module start 'content'
Timing: Jan 18 2025 19:39:45
Module end 'content'
Timing: Jan 18 2025 19:39:45
Script end

Main resources:

Total runtime0.8475 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.0061 587.9141152.6250
Module start 'layout' 0.00620.0027 740.539139.4453
Module start 'content' 0.00880.8373 779.9844574.2188
Module end 'content' 0.84610.0014 1,354.203112.1641
Script end 0.8475  1,366.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3519160.0002
Check MTime0.00120.1436160.0001
Mysql Total
Database connection0.00090.110810.0009
Mysqli_queries0.797694.1127620.0129
Looping result0.00050.0587600.0000
Template Total0.818796.620.4093
Template load0.00180.214920.0009
Template processing0.816896.382420.4084
Template load and register function0.00020.018710.0002
states
state_id_array0.00070.079910.0007
state_identifier_array0.00110.126120.0005
Override
Cache load0.00150.1764310.0000
Sytem overhead
Fetch class attribute can translate value0.00040.051030.0001
Fetch class attribute name0.00160.187450.0003
XML
Image XML parsing0.00070.080330.0002
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00090.1018160.0001
String conversion0.00000.001040.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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 7

Time used to render debug report: 0.0001 secs