Generate URL to point to alternate template

Author Message

Daniel Guerrier

Wednesday 30 March 2005 11:34:19 am

Ok, I am getting the hang of this thing.
But again the stuff that seems to be trivial is difficult to do.

I have a custom pagelayout with frames. Each frame is loaded using two seperate layput templates
The bottom frame grabs some article and list them.

{let children=fetch( content,
                     list,
                     hash( parent_node_id, 58)
                    )
}
{section name=Child loop=$children}
{$:item.object.published|l10n(shortdate)}<br/>
{attribute_view_gui attribute=$:item.object.data_map.title}<br/>
<a href={$:item.url_alias|ezurl}>{$:item.name}</a><br/>
<a href={'layout/set/displayarticle/news/article1'}>{$:item.name}</a>
{/section}
{/let}

I have two links for testing.
The first link load the article in the current window using the current custom layout template which is what I expectd.

What I want to do is have the second link use a different article template which was already defined in layout.ini. However the link that gets built has the current path to the current layout with the information seen in the link appended to it.

ex:
http://brutus:9000/index.php/plain/layout/set/bottomframe/news/layout/set/displayarticle/news/article1
I want it to be:
http://brutus:9000/index.php/plain/layout/set/displayarticle/news/article1

So how do I build a link to the article that is displayed using a different layout then the layout in the originating url.

Hope that makes sense

Daniel Guerrier

Wednesday 30 March 2005 12:56:28 pm

Also, here is how I am loading the frames in the layout template.

{*?template charset=utf-8?*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="no" lang="no">
<head></head>
<frameset rows="150,*" framespacing="1" border="1">
<frame src={'layout/set/topframe/' |ezurl} >
<frame src={'layout/set/bottomframe/' |ezurl} >
</frameset>
</html>

Again I just need to create a url that loads the article layout template and replace the info in the bottom frame.

Thanks in advance!

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 31 2025 08:17:57
Script start
Timing: Jan 31 2025 08:17:57
Module start 'layout'
Timing: Jan 31 2025 08:17:57
Module start 'content'
Timing: Jan 31 2025 08:17:58
Module end 'content'
Timing: Jan 31 2025 08:17:58
Script end

Main resources:

Total runtime1.1399 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.2656151.2266
Module start 'layout' 0.00770.0049 739.492236.6797
Module start 'content' 0.01261.1265 776.1719855.5781
Module end 'content' 1.13910.0007 1,631.75007.8125
Script end 1.1399  1,639.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2909160.0002
Check MTime0.00130.1154160.0001
Mysql Total
Database connection0.00120.108010.0012
Mysqli_queries1.090795.6858520.0210
Looping result0.00040.0395500.0000
Template Total1.092895.920.5464
Template load0.00200.175520.0010
Template processing1.090895.694020.5454
Template load and register function0.00110.100510.0011
states
state_id_array0.00210.182410.0021
state_identifier_array0.00110.099420.0006
Override
Cache load0.00170.1461220.0001
Sytem overhead
Fetch class attribute can translate value0.00040.033910.0004
Fetch class attribute name0.00150.129420.0007
XML
Image XML parsing0.00010.007610.0001
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00330.2903100.0003
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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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: 6

Time used to render debug report: 0.0001 secs