Forums / Setup & design / Generate URL to point to alternate template

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!