Forums / Setup & design / $pagedesign not working?

$pagedesign not working?

Author Message

Simon Thia

Thursday 10 May 2007 4:26:44 am

i have edited the template look through the admin interface but the image isn't displayed nor the alternative text,

I tried to find where the problem was and I the only thing that seemed to match was

       img src={$pagedesign.data_map.image.content[logo].full_path|ezroot} 

Where could I find some information about how the "$pagedesign" work?

Niko Goers

Friday 11 May 2007 7:34:27 am

$pagedesign?

I have never heared of it. Does it exist? Is it your variable?

Which template have you edited?

Try:

<img src={$variable_name.data_map.attribute_name.content.image_class.url|ezroot} alt="" title="" />

or use the attribute_view_gui

{attribute_view_gui attribute=$variable_name.data_map.attribute_name}

To display the content of a variable you can use {$variable_name|attribute(show)}. That works if the variable contains an array. Otherwise just {$variable_name}.

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Bin LIU

Monday 14 May 2007 3:31:43 am

are you do it in your tpl :

{def $pagedesign = fetch( 'content', 'object', hash( 'object_id', '54' ) )}

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Simon Thia

Monday 14 May 2007 4:54:49 am

The line I pointed in my first post is extracted from the pagelayout.tpl of /design/base
and $pagedesign is define with

{let pagedesign=fetch_alias(by_identifier,hash(attr_id,sitestyle_identifier))}

Niko Goers

Tuesday 15 May 2007 9:34:19 am

Which image do you want to show? Is it an attribute of a content object?

I think that the $pagedesign variable cannot help you.

If you want to know the content of $pagedesign, use:

{$pagedesign|attribute(show)}

If you want to use an attribute of a content object, use:

{def $your_variable=fetch('content','list',hash('parent_node_id',2))}

2 = a node id
current node id = $node.node_id

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Simon Thia

Wednesday 16 May 2007 6:28:07 am

Actually i've just seen that the image I wanted to display was hard coded in the template.
So I'd like to apologize to all who answered to my post.

But I still don't understand what does the $pagedesign do in the pagelayout.tpl of the base design in eZ P. 3.9.1 (plain_site).
I tried to understand by showing all the attributes as Niko says but the there's a list of dozens of attributes.

If someone could tell me where does the function search the attributes that would help me a lot. and the fetch function isn't clear for me.

Niko Goers

Friday 18 May 2007 12:50:46 am

I had to take a look what the >fetch_alias< function do and I found this:

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_functions/miscellaneous/fetch_alias

The >fetch_alias< function takes the needed fetch-information out of the fetchalias.ini in the settings folder.

The part that your fetch_alias function use should be:

#usage : fetch_alias(by_identifier, hash(attr_id, <unique text> ))
[by_identifier]
Module=content
FunctionName=object_by_attribute
Parameter[identifier]=attr_id

Than I searched for >object_by_attribute<, but this function is no more in use by eZp.

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/object_by_attribute

Afterwards I take a look at the content of $pagedesign again. I found out that the $pagedesign fetches all information of the design area in your site_admin.

Your site_admin -> Design -> Look and feel.

Thats what the $pagedesign fetch.

I hope the way how the $pagedesign works is now much clearer for you. For me too :)

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Simon Thia

Friday 18 May 2007 7:23:02 am

Thank you,

that last link was very useful.