retrieve a content javascript

Author Message

Alain Mangana

Wednesday 22 October 2008 7:17:08 am

how to retrieve the contents of a variable javascript in a variable ezpublish

http://tikdem.com
/

Yannick Komotir

Wednesday 22 October 2008 7:40:20 am

it not possible with javascript for to do this, you can use Ajax

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Gaetano Giunta

Wednesday 22 October 2008 10:10:19 am

but you can set a js variable in an ez template and later use it (in js) in another template

eg: you can use this trick to set a js variable telling whether the user is logged in at the top of the pagelayout, and later use this in a node template to show or hide an "add comment" button - just remember in that case that you still need to set up real security via the permission system, and not rely on javascript security...

Principal Consultant International Business
Member of the Community Project Board

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 31 2025 01:33:09
Script start
Timing: Jan 31 2025 01:33:09
Module start 'layout'
Timing: Jan 31 2025 01:33:09
Module start 'content'
Timing: Jan 31 2025 01:33:10
Module end 'content'
Timing: Jan 31 2025 01:33:10
Script end

Main resources:

Total runtime1.3017 sec
Peak memory usage8,192.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.1328151.2109
Module start 'layout' 0.00540.0039 739.3438220.6875
Module start 'content' 0.00931.2916 960.03134,484.9922
Module end 'content' 1.30090.0008 5,445.023411.8516
Script end 1.3017  5,456.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2786160.0002
Check MTime0.00120.0960160.0001
Mysql Total
Database connection0.00080.064610.0008
Mysqli_queries1.209992.9471590.0205
Looping result0.00070.0527570.0000
Template Total1.248195.920.6241
Template load0.00180.140720.0009
Template processing1.246395.738420.6231
Template load and register function0.00140.110510.0014
states
state_id_array0.00080.062610.0008
state_identifier_array0.00180.138720.0009
Override
Cache load0.00150.1166120.0001
Sytem overhead
Fetch class attribute can translate value0.00220.167230.0007
Fetch class attribute name0.00210.163160.0004
XML
Image XML parsing0.00500.383930.0017
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00580.4443280.0002
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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs