Custom designs and switching in shop areas

Author Message

steve walker

Thursday 16 December 2004 3:26:28 am

Hi there,

Echoing the frustrations of:

http://ez.no/community/forum/developer/where_to_assign_section_layout_for_shop_and_search_modules

http://ez.no/community/forum/setup_design/unique_shop_layout

I'm trying to carry through my use of section switches dependent on the area of the website the user is in.

Its all fine with node_ids and sections - but once you enter the checkout areas like /shop/basket.tpl the model seems to break. It just seems to take on the identity (section id at least) from the area you came from...

Could anyone tell me the magic words that fix this?

Thanks, Steve.

http://www.oneworldmarket.co.uk

Eirik Alfstad Johansen

Friday 17 December 2004 12:30:19 am

Hi Steve,

Once you reach the shop module, the section id no longer exists. Sections only exist for the content module.

Hope this helps.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

steve walker

Friday 17 December 2004 2:12:20 am

Eirik,

Thanks for your reply.

So if sections canot be used here, whats the unique identifier that can be used?

Is it possible, say, to use the template as an identifier:

Match[template]=basket.tpl

Someone must have experienced this issue?

Cheers, Steve.

http://www.oneworldmarket.co.uk

Eirik Alfstad Johansen

Friday 17 December 2004 2:44:20 am

Hi Steve,

Check out http://ez.no/ez_publish/documentation/customization/custom_design/template_variables_set_by_ezpublish

Perhaps you could use $module_result.path or $module_result.uri?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

steve walker

Friday 17 December 2004 4:21:19 am

Thanks Eirik.

I have tried puting:

{$node|attribute(show,3)}
{$DesignKeys:used|attribute(show)}
{$node|attribute(show)}

and also:

module_result <br />{$module_result|attribute(show,5)}
designkeys <br />{$DesignKeys:used|attribute(show,5)}
view_parameters <br />{$view_parameters|attribute(show)}
uri_string {$uri_string} <br />
requested_uri_string {$requested_uri_string} <br />
site <br />{$site|attribute(show)}
ezinfo <br /> {$ezinfo|attribute(show)}

but the only info I can get out of it is that it belongs to section 5, which is the section that the product page leading to /shop/basket came from...

I don't suppose any of the Ez Crew could shed some light on this?

Thanks, Steve.

http://www.oneworldmarket.co.uk

Eirik Alfstad Johansen

Friday 17 December 2004 4:47:34 am

Hi Steve,

When I do {$module_result.uri} in my pagelayout.tpl, it prints out the URI, also when I'm in the basket view of the shop module (remember to check for the $module_result.uri in the pagelayout template and not the shop/basket template).

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

steve walker

Friday 17 December 2004 7:48:57 am

Eirik,

Hurray! Yep, the problem was I was putting the code into basket.tpl..

Have got a switch working using:

{switch match=$module_result.uri}
{case match="/gia/shop/basket"}

this is basket page

{/case}
{case} 

this isnt!!!

{/case}
{/switch}

Many thanks for your help on this.

Regards, Steve.

http://www.oneworldmarket.co.uk

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 18 2025 20:05:15
Script start
Timing: Jan 18 2025 20:05:15
Module start 'layout'
Timing: Jan 18 2025 20:05:15
Module start 'content'
Timing: Jan 18 2025 20:05:17
Module end 'content'
Timing: Jan 18 2025 20:05:17
Script end

Main resources:

Total runtime1.4306 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0121 588.0469152.6406
Module start 'layout' 0.01210.0041 740.687539.4766
Module start 'content' 0.01621.4130 780.1641581.1953
Module end 'content' 1.42910.0014 1,361.359416.1250
Script end 1.4306  1,377.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2809160.0003
Check MTime0.00180.1274160.0001
Mysql Total
Database connection0.00130.089110.0013
Mysqli_queries1.350294.3830690.0196
Looping result0.00070.0492670.0000
Template Total1.370395.820.6852
Template load0.00220.154420.0011
Template processing1.368195.630620.6840
Template load and register function0.00020.015810.0002
states
state_id_array0.00090.063010.0009
state_identifier_array0.00400.281120.0020
Override
Cache load0.00170.1206510.0000
Sytem overhead
Fetch class attribute can translate value0.00060.038720.0003
Fetch class attribute name0.00090.064280.0001
XML
Image XML parsing0.00060.041720.0003
class_abstraction
Instantiating content class attribute0.00000.0016100.0000
General
dbfile0.00720.5033160.0005
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs