Use form data to set persistent variable?

Author Message

Howard Rawlings

Thursday 13 January 2011 2:45:20 am

Hi

I am developing a site using eZ Publish 4.3.0 that contains information for veterinarians only, so visitors need to confirm they are a vet before they can access the site - otherwise they are redirected to another site containing information for pet owners.

I have set up a form that can be shown within a colorbox overlay, but am struggling with how to handle the submitted data. What I want to happen is for a variable to be set that can be checked by pagelayout.tpl every time it loads. If the variable has not been set, the overlay should be shown, but if it has, the overlay is not shown.

I have the overlay and the form working, and can make it work using JS and cookies if necessary, but assume that eZ already has something that can deal with this in a more "elegant" manner.

Any ideas?

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

Main resources:

Total runtime1.2984 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.0054 588.0469152.6406
Module start 'layout' 0.00540.0036 740.687539.4844
Module start 'content' 0.00901.2877 780.1719399.3203
Module end 'content' 1.29670.0017 1,179.49228.1250
Script end 1.2984  1,187.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2573160.0002
Check MTime0.00130.1026160.0001
Mysql Total
Database connection0.00090.065810.0009
Mysqli_queries1.258296.9013460.0274
Looping result0.00050.0403440.0000
Template Total1.268997.720.6344
Template load0.00210.158220.0010
Template processing1.266897.568220.6334
Template load and register function0.00030.026610.0003
states
state_id_array0.00090.069610.0009
state_identifier_array0.00080.065320.0004
Override
Cache load0.00160.124080.0002
Sytem overhead
Fetch class attribute can translate value0.00070.051310.0007
Fetch class attribute name0.00120.090710.0012
XML
Image XML parsing0.00010.009310.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00060.0490100.0001
String conversion0.00000.000740.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/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: 4
 Number of unique templates used: 4

Time used to render debug report: 0.0002 secs