Share » Forums » Setup & design » Adapting orderview.tpl

Adapting orderview.tpl

Adapting orderview.tpl

Friday 20 May 2005 9:30:04 am - 4 replies

Author Message

Paul Forsyth

Friday 20 May 2005 1:53:12 pm

Try something like:

{let node=fetch(content,node,hash(node_id, $product_item.node_id)}
{attribute_view_gui attribute=$node.data_map.file}
{/let}

assuming file is your node's file ;)

paul

Steve P

Saturday 21 May 2005 5:03:14 am

Thanks Paul, but still no joy I'm afraid :(

My class [paper]:
name
product_number
author
abstract
key_words
price
full_paper [the binary file]

{$product_item.node_id} returns 212 in this example & <a href={concat("/content/view/full/",$product_item.node_id,"/")|ezurl}>{$product_item.object_name}</a>
links correctly to the "page".

Using your code:
{let node=fetch(content,node,hash(node_id, $product_item.node_id)}
{attribute_view_gui attribute=$node.data_map.full_paper}
doesn't work & I have tried similar techniques with no luck. My paper template contains: {attribute_view_gui attribute=$node.object.data_map.full_paper} (note .object) & this works in the template but not my orderview.tpl. I bet this is really easy, but I just can't work it out!

Thanks again

Steve

Paul Forsyth

Saturday 21 May 2005 7:38:01 am

Worth checking your node exists: {$node|attribute(show,1)}.

Btw, does this line have a typo?

{let node=fetch(content,node,hash(node_id, $product_item.node_id)}

You need an extra bracket there.

paul

Steve P

Saturday 21 May 2005 8:05:27 am

Thanks Paul. I'm cross with myself for not noticing the missing bracket!!

Now works fine :)

Onwards to the next problem to try & get my head 'round...

Very best wishes

Steve

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu