$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.

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

eZ debug

Timing: Jan 31 2025 05:27:57
Script start
Timing: Jan 31 2025 05:27:57
Module start 'layout'
Timing: Jan 31 2025 05:27:57
Module start 'content'
Timing: Jan 31 2025 05:27:57
Module end 'content'
Timing: Jan 31 2025 05:27:57
Script end

Main resources:

Total runtime0.0194 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.1250151.2109
Module start 'layout' 0.00670.0035 739.335936.6484
Module start 'content' 0.01020.0074 775.9844102.2656
Module end 'content' 0.01760.0017 878.250041.9922
Script end 0.0194  920.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.6320140.0002
Check MTime0.00125.9822140.0001
Mysql Total
Database connection0.00105.186610.0010
Mysqli_queries0.003819.595830.0013
Looping result0.00000.108110.0000
Template Total0.00136.610.0013
Template load0.00104.898010.0010
Template processing0.00031.652710.0003
Override
Cache load0.00073.363210.0007
General
dbfile0.002613.322580.0003
String conversion0.00000.036840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs