load custom footer(page) from template

Author Message

ricardo dijken

Tuesday 15 March 2011 3:59:15 am

Hi, got another question hope u can help me with this.

im trying to get an footer in my pagelayout.tpl with content from an page i created under the home node using an custum class. found this script on the www, it shows all the info about that page. but how do i display the content. In this class i got the attribute "footer" that i would like to display.

{let test=fetch('content',object,hash(object_id,185))}

{$test|attribute(show,1)}

{/let}

could someone help me with this.

Many thanks,

Ricardo

Marko Žmak

Tuesday 15 March 2011 4:42:43 am

You should use:

{attribute_view_gui attribute=$test.object.data_map.footer}

But also, depending on type of the "footer" attribute you can use other methods. For example if it's a text field you can also use:

{$test.object.data_map.footer.content|wash()}

Also look at the eZ docs for properties of each datatype.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

ricardo dijken

Tuesday 15 March 2011 7:42:22 am

Got it working by using

{let footer=fetch('content',object,hash(object_id,185))}
{attribute_view_gui attribute=$footer.data_map.footer}
{/let}

Many thanks

Ricardo

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.