Fixed / Dynamic Width - How To ...

Author Message

Luis M

Thursday 25 January 2007 8:26:40 am

Hi,

I this site, ez.no, in the top-right, near the flags, exists an option: ">> Fixed width" or toggle it to "Dynamic width", how can we do it ? is it an ajax code or a "standard" way ?

Thanks,

Luis

Claudia Kosny

Sunday 28 January 2007 1:05:07 pm

Hi Luis

On the ez.no webpage there seems to be an javascript that changes some class and style information for some elements in the webpage. You don't need any ajax as you do not make a request to the server, you just change the css.
Something similar is described here: http://alistapart.com/comments/switchymclayout/ , but please read also the discussion for this article as the approach described there is far from being perfect. Still - it should give you an idea on how to tackle this problem. Of course you can always have a look at the javascript and css used on the ez.no site (be careful not to violate any copyrights though).

Claudia

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 19 2025 01:14:49
Script start
Timing: Jan 19 2025 01:14:49
Module start 'layout'
Timing: Jan 19 2025 01:14:49
Module start 'content'
Timing: Jan 19 2025 01:14:50
Module end 'content'
Timing: Jan 19 2025 01:14:50
Script end

Main resources:

Total runtime0.9365 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 589.1563152.6250
Module start 'layout' 0.00750.0036 741.781339.4453
Module start 'content' 0.01110.9242 781.2266457.4844
Module end 'content' 0.93530.0012 1,238.71098.1563
Script end 0.9365  1,246.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3937160.0002
Check MTime0.00140.1531160.0001
Mysql Total
Database connection0.00120.131210.0012
Mysqli_queries0.881994.1678540.0163
Looping result0.00050.0561520.0000
Template Total0.889595.020.4448
Template load0.00230.246020.0012
Template processing0.887294.733520.4436
Template load and register function0.00020.017710.0002
states
state_id_array0.00170.178610.0017
state_identifier_array0.00120.123120.0006
Override
Cache load0.00190.2024120.0002
Sytem overhead
Fetch class attribute can translate value0.00060.067820.0003
Fetch class attribute name0.00090.098120.0005
XML
Image XML parsing0.00020.023720.0001
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.01241.3237100.0012
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs