Forums / Setup & design / Preview site

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"

eZ debug

Timing: Jan 18 2025 15:59:23
Script start
Timing: Jan 18 2025 15:59:23
Module start 'content'
Timing: Jan 18 2025 15:59:24
Module end 'content'
Timing: Jan 18 2025 15:59:24
Script end

Main resources:

Total runtime1.4247 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.0156180.8516
Module start 'content' 0.00721.2996 769.8672626.7344
Module end 'content' 1.30680.1178 1,396.6016341.3906
Script end 1.4246  1,737.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2890210.0002
Check MTime0.00150.1023210.0001
Mysql Total
Database connection0.00080.057810.0008
Mysqli_queries1.341794.17922020.0066
Looping result0.00210.14842000.0000
Template Total1.393697.820.6968
Template load0.00190.130120.0009
Template processing1.391797.686620.6959
Template load and register function0.00010.008110.0001
states
state_id_array0.00170.122410.0017
state_identifier_array0.00180.129120.0009
Override
Cache load0.00160.1154400.0000
Sytem overhead
Fetch class attribute can translate value0.00110.073940.0003
Fetch class attribute name0.00170.119680.0002
XML
Image XML parsing0.00180.127540.0005
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00360.2506420.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0003 secs