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.