Forums / Developer / Custom designs and switching in shop areas

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

eZ debug

Timing: Jan 18 2025 18:41:28
Script start
Timing: Jan 18 2025 18:41:28
Module start 'content'
Timing: Jan 18 2025 18:41:29
Module end 'content'
Timing: Jan 18 2025 18:41:29
Script end

Main resources:

Total runtime0.7890 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.9766180.8125
Module start 'content' 0.00650.6386 769.7891586.2891
Module end 'content' 0.64510.1438 1,356.0781341.0547
Script end 0.7890  1,697.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4987210.0002
Check MTime0.00150.1850210.0001
Mysql Total
Database connection0.00110.145410.0011
Mysqli_queries0.706389.51752060.0034
Looping result0.00230.28632040.0000
Template Total0.761496.520.3807
Template load0.00220.276520.0011
Template processing0.759296.218920.3796
Template load and register function0.00010.017310.0001
states
state_id_array0.00110.140710.0011
state_identifier_array0.00070.087420.0003
Override
Cache load0.00200.2484510.0000
Sytem overhead
Fetch class attribute can translate value0.00200.254030.0007
Fetch class attribute name0.00100.122780.0001
XML
Image XML parsing0.00080.103630.0003
class_abstraction
Instantiating content class attribute0.00000.0026100.0000
General
dbfile0.00200.2587270.0001
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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs