Banner/Billboard placement in pagelayout.tpl

Banner/Billboard placement in pagelayout.tpl

Monday 03 November 2008 8:56:11 am - 4 replies

Author Message

Greg McAvoy-Jensen

Monday 03 November 2008 9:13:48 am

You might try:
content_view_gui view=billboard content_object=$my_node.data_map.billboard.content}

The last word, "billboard" should correspond to the name of the attribute for the actual billboard.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Steve Pina

Monday 03 November 2008 10:34:50 am

Thanks for the reply Greg.

So I placed your code in and nothing displays. I have the following:

{def $my_node=fetch( content, node, hash( node_id, 160 ) )}
{content_view_gui view=billboard content_object=$my_node.data_map.Home-Banner.content}

Home Banner is the name of my graphic so I put Home-Banner. Does any of this need to be contained in <img tag?

Thanks!

Greg McAvoy-Jensen

Monday 03 November 2008 11:43:08 am

Actually, it sounds like the node you've called is the actual banner itself, so you'll probably want:

{attribute_view_gui attribute=$my_node.object.data_map.X image_class=billboard}

To find out what to enter for X, plunk in this code:
{$my_node.object.data_map|attribute(show,1)}
This will reveal the listing of the names of the fields ("attributes") for whatever your banner class is. Pick the one that has the actual image in it.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Steve Pina

Tuesday 04 November 2008 12:57:40 pm

So if put in the following:

{def $my_node=fetch( content, node, hash( node_id, 43 ) )}
{$my_node.object.data_map|attribute(show,1)}

{def $my_node1=fetch( content, node, hash( node_id, 59 ) )}
{$my_node1.object.data_map|attribute(show,1)}

{def $my_node2=fetch( content, node, hash( node_id, 160 ) )}
{$my_node2.object.data_map|attribute(show,1)}

43 = Media (which is Media Library)
59 = Banners (under media)
160 = HomeBanner (under Banners, the image I want to display)

They all display the same stuff (the Attributes change but the Type and Value don't):
Attribute Type Value
name object[eZContentObjectAttribute] Object

This code:
{$my_node2.name|wash}
Will display: HomeBanner

All I want to do display an image that is in Media -- Banners. It can be this hard can it? Thanks!

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

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