To load a template from javascript present in the templates

Author Message

Romeo Antony

Monday 01 November 2010 3:26:14 am

Hi,

Please anyone try to help me to load a template from javascipt

For instance

if users browser javascript is enabled then load a template ,

if users breoswer doeanot enabled javascript some other template

<script type="text/javascript">

/ to load a template from design/template1 folder in ez(js enabled)

</script>

/ to load a template from design/template2 folder in ez (js disabled)
<noscript>
Javascript is disabled
</noscript>

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 10:23:06
Script start
Timing: Jan 18 2025 10:23:06
Module start 'layout'
Timing: Jan 18 2025 10:23:06
Module start 'content'
Timing: Jan 18 2025 10:23:07
Module end 'content'
Timing: Jan 18 2025 10:23:07
Script end

Main resources:

Total runtime0.8933 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.2891152.6563
Module start 'layout' 0.00750.0037 741.945339.5156
Module start 'content' 0.01110.8803 781.4609434.6328
Module end 'content' 0.89140.0019 1,216.09388.0938
Script end 0.8933  1,224.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4270160.0002
Check MTime0.00150.1686160.0001
Mysql Total
Database connection0.00120.129510.0012
Mysqli_queries0.846294.7245460.0184
Looping result0.00070.0756440.0000
Template Total0.854195.620.4270
Template load0.00230.260920.0012
Template processing0.851795.345220.4259
Template load and register function0.00010.012110.0001
states
state_id_array0.00180.204310.0018
state_identifier_array0.00190.214420.0010
Override
Cache load0.00180.2063160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.061810.0006
Fetch class attribute name0.00090.097220.0004
XML
Image XML parsing0.00050.056810.0005
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00090.0999160.0001
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/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: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs