Preview site

Author Message

Guillaume Kulakowski

Friday 17 July 2009 9:33:55 am

Hi,

I search the best way for made a preview site. Preview site would be a siteaccess who display the last draft version of all node and no the published version.
The "view" function in site admin is unfortunately limited to 1 node

An idea ?

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Ɓukasz Serwatka

Monday 20 July 2009 12:30:21 am

Hi,

Just of out of curiosity. Could you provide an use case when do you need a last draft of all nodes?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Guillaume Kulakowski

Monday 20 July 2009 12:50:49 am

Hi,

For preview an entiere website with complexes pages build from multiple node.

Also for have 2 sites versions : the production site and a draft site.

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Gaetano Giunta

Monday 20 July 2009 5:01:49 am

I fear that an "eZ" way to build preview entire parts of the site is currently missing.

You might try to take advantage of some of the other features to achieve it, with a bit of hacking:

- if your site is monolingual, set up a fictional language that is the 'preview' version, then add a siteaccess that shows that language as main one. You will then have to hack a lot of admin templates to hide the standard translation buttons and make them look like 'preview' buttons, and add a workflow event or some other code to copy the 'preview' language into the main one

- set up all of your remplates to fetch content in draft mode if it is there (but which draft, when there are many?) and standard version if it is not there

- try to use the object states - take care: you cannot have one state per version, only one state per object

Principal Consultant International Business
Member of the Community Project Board

Guillaume Kulakowski

Monday 20 July 2009 5:50:44 am

Thx Gaetano,

> - if your site is monolingual, set up a fictional language that is the 'preview' version, then
> add a siteaccess that shows that language as main one. You will then have to hack a lot
> of admin templates to hide the standard translation buttons and make them look like
> 'preview' buttons, and add a workflow event or some other code to copy the 'preview'
> language into the main one
Thank you for this tip

> - set up all of your remplates to fetch content in draft mode if it is there (but which draft,
> when there are many?) and standard version if it is not there
I thought go to this solution ... But I fear a large number of templates to modify and maintain in parallel

> - try to use the object states - take care: you cannot have one state per version, only one
> state per object
I have exclude this solution for this reason

Thx

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

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 04:33:40
Script start
Timing: Jan 31 2025 04:33:40
Module start 'layout'
Timing: Jan 31 2025 04:33:40
Module start 'content'
Timing: Jan 31 2025 04:33:42
Module end 'content'
Timing: Jan 31 2025 04:33:42
Script end

Main resources:

Total runtime1.6155 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0078151.1953
Module start 'layout' 0.00650.0023 739.203136.6172
Module start 'content' 0.00871.6060 775.82031,017.4297
Module end 'content' 1.61470.0008 1,793.250015.8828
Script end 1.6155  1,809.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.1918160.0002
Check MTime0.00130.0785160.0001
Mysql Total
Database connection0.00120.074610.0012
Mysqli_queries1.540995.3809650.0237
Looping result0.00080.0480630.0000
Template Total1.581097.920.7905
Template load0.00190.118920.0010
Template processing1.579197.741320.7895
Template load and register function0.00190.117310.0019
states
state_id_array0.00140.085710.0014
state_identifier_array0.00100.063120.0005
Override
Cache load0.00170.1029400.0000
Sytem overhead
Fetch class attribute can translate value0.00070.041430.0002
Fetch class attribute name0.00180.109980.0002
XML
Image XML parsing0.00700.432030.0023
class_abstraction
Instantiating content class attribute0.00000.0012100.0000
General
dbfile0.00590.3658310.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/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: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs