slider in eZ publish

Author Message

MichaƂ Ambroziak

Friday 25 February 2011 7:45:40 am

Hello everyone,

At the beginning I need to explain that I'm newbie at eZ publish. I'm working on my website using ezwebin extension, but have one problem. Don't know who to implement slider for example like this one: http://www.redpill-linpro.com/

Thanks in advance

Michael

Theodoros Papageorgiou

Friday 25 February 2011 9:24:48 am

Hello,

You can copy the image class and create a new class, for example 'slider_image' with the attributes name, caption, image, link [Object relation].

In your Content structure create a folder for your slider images.

Then create a template for your slider, for example 'slider.tpl' and fetch your slider images:

{def $slider_images=fetch( 'content', 'list',
hash( 'parent_node_id', <your folder's node id>,
'sort_by', array('priority', true()) ))}

Then iterate over your nodes

{foreach $slider_images as $slider}
...............
{/foreach}

If you need your slider on the frontpage only you can hardcode it in your pagelayout.tpl

{if eq( $module_result.node_id , 2)}
{include uri='design:slider.tpl'}
{/if}

There's also a nice tutorial that can help you on this:
http://share.ez.no/learn/ez-publish/transforming-jquery-plugins-into-ez-publish-extensions

Hope this helps!

WEBWiZ
Web Development
http://www.webwiz.gr

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 01:12:55
Script start
Timing: Jan 18 2025 01:12:55
Module start 'layout'
Timing: Jan 18 2025 01:12:55
Module start 'content'
Timing: Jan 18 2025 01:12:55
Module end 'content'
Timing: Jan 18 2025 01:12:55
Script end

Main resources:

Total runtime0.0221 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 589.0313152.6250
Module start 'layout' 0.00760.0049 741.656339.4531
Module start 'content' 0.01260.0069 781.109489.4141
Module end 'content' 0.01950.0026 870.523430.2891
Script end 0.0221  900.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002912.9053140.0002
Check MTime0.00125.4925140.0001
Mysql Total
Database connection0.00135.826610.0013
Mysqli_queries0.004419.828930.0015
Looping result0.00000.135810.0000
Template Total0.00208.910.0020
Template load0.00114.840610.0011
Template processing0.00094.072210.0009
Override
Cache load0.00073.001110.0007
General
dbfile0.00135.862180.0002
String conversion0.00000.049640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs