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.

eZ debug

Timing: Jan 18 2025 18:19:20
Script start
Timing: Jan 18 2025 18:19:20
Module start 'content'
Timing: Jan 18 2025 18:19:20
Module end 'content'
Timing: Jan 18 2025 18:19:20
Script end

Main resources:

Total runtime0.7275 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0239 587.7031180.8438
Module start 'content' 0.02390.5973 768.5469649.2422
Module end 'content' 0.62120.1063 1,417.7891345.0625
Script end 0.7274  1,762.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4945210.0002
Check MTime0.00140.1894210.0001
Mysql Total
Database connection0.00110.156810.0011
Mysqli_queries0.630486.64772110.0030
Looping result0.00180.24552090.0000
Template Total0.684394.120.3421
Template load0.00190.260320.0009
Template processing0.682393.794820.3412
Template load and register function0.00020.025010.0002
states
state_id_array0.00090.125610.0009
state_identifier_array0.00080.108520.0004
Override
Cache load0.00170.2324550.0000
Sytem overhead
Fetch class attribute can translate value0.00100.134740.0002
Fetch class attribute name0.00200.2761100.0002
XML
Image XML parsing0.00270.366540.0007
class_abstraction
Instantiating content class attribute0.00000.0037120.0000
General
dbfile0.00490.6695320.0002
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs