ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

jquery content slider with expression engine

August 31, 2009 8:47am

Subscribe [2]
  • #1 / Aug 31, 2009 8:47am

    marsh

    8 posts

    I want to setup a featured content slider that links to the full article like this one http://features.bizmore.com/ which uses jquery easyslider from here http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding.

    The process seems simple enough. The challenge is integrating it to work with EE. Any ideas how to do this?

    Thanks.

  • #2 / Aug 31, 2009 11:53am

    brankin

    150 posts

    If you are not duplicating the info any where else on the site you can set up a blog with custom fields for each line.  Or if you want to use data from an entry that will be parsed somewhere else on the site just add custom fields to the blog that you are already using.

    Looking at the source for featured it looks like you will only need to add an image field.

    <div id="fd-feature" class="clickable"> 
                        <a href="http://features.bizmore.com/images/frontdoor-features/1.jpg">http://features.bizmore.com/images/frontdoor-features/1.jpg</a> 
                    <div id="fd-feature-copy"> 
                        <h4 class="fd-topic">Best Practice</h4> 
                        <h2 class="fd-headline">Apple's 'Daily Download'</h2> 
                        What keeps Apple Retail Stores humming? A quick all-hands briefing with staff every morning before the doors open.<a href="http://features.bizmore.com/2009/07/the-daily-download/class=fd-more">read more »</a> 
                    </div> 
    </div>

    *from http://features.bizmore.com/

    you could code something to resemble:

    <div id="fd-feature" class="clickable"> 
                        {featureimage} 
                    <div id="fd-feature-copy"> 
                        <h4 class="fd-topic">{title}</h4> 
                        <h2 class="fd-headline">{summary}</h2> 
                        {body}
                    </div>
    </div>

    Another thing to do is to add a custom status to the blog, such as “slider” or “mainpage” that way you can pull only articles that you want to go to the main page and not every article that is entered into that blog.

    Later,
    Bryan

  • #3 / Aug 31, 2009 12:15pm

    marsh

    8 posts

    Thanks Bryan. This provides a good starting point. I’ll sort it out and let you know.

  • #4 / Aug 31, 2009 12:21pm

    brankin

    150 posts

    sounds good.

    Later,
    Bryan

  • #5 / Nov 13, 2009 2:28pm

    the_crimsonrooster

    264 posts

    i’m working on the same thing. kwaku did you come up with a solution? I’m using code like the following:

    <li class="ui-tabs-selected"><a href="#fragment-1">head 1</a></li>
    <li><a href="#fragment-2">head 2</a></li>
    <li><a href="#fragment-3">Head 3</a></li>
    <li><a href="#fragment-4">head 4</a></li>
    <!-- First Content -->
    <div id="fragment-1" class="ui-tabs-panel">    
    {site_url}/images/site/Headline_content.jpg</div>
    
     <!-- Second Content -->
    <div id="fragment-2" class="ui-tabs-panel ui-tabs-hide">
    {site_url}/images/site/image2.jpg   </div>

    I did think like brankin and set up one weblog that can be used for multiple sliders. I create a custom dropdown field where u say which slider the content belong to.

    Now i’m trying to come up with the most effective way to populate the slider. I could have individual weblog code for each link and div that used offsets (offset=1, etc..,) but that sounds like too much code. I’m wondering if I could create custom categories and work it for that angel.

    Any suggestions.

  • #6 / Nov 13, 2009 3:08pm

    the_crimsonrooster

    264 posts

    I couldn’t figure out a better way they using offsets and multiple weblog tags. It works fine, see below.

    {exp:weblog:entries weblog="featured" orderby="date" limit="1" disable="member_data|trackbacks }
    {if feature_location=="Main"}
    <li class="ui-tabs-selected"><a href="#fragment-1">{title}</a></li>
    {/if}
    {/exp:weblog:entries}
    
                                
    {exp:weblog:entries weblog="featured" offset="1" orderby="date" limit="1" disable="member_data|trackbacks }
    {if feature_location=="Main"}
    <li><a href="#fragment-2">{title}</a></li> {/if}
    {/exp:weblog:entries}
    <!-- First Content -->
    {exp:weblog:entries weblog="featured" orderby="date" limit="1" disable="member_data|trackbacks }
    {if feature_location=="Main"}
    <div id="fragment-1" class="ui-tabs-panel">    
    {image}</div>{/if}
    {/exp:weblog:entries}
                        
               
    <!-- Second Content -->
    {exp:weblog:entries weblog="featured" offset="1" orderby="date" limit="1" disable="member_data|trackbacks }
    {if feature_location=="Main"}
    <div id="fragment-2" class="ui-tabs-panel ui-tabs-hide">
    {image}{/if}
    </div>
    {/exp:weblog:entries}

    I just have to add my links. If you come up with something better, let me know.

  • #7 / Nov 14, 2009 5:36am

    marsh

    8 posts

    Thanks. I have no better way as yet. Your suggestion looks interesting and will try it.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases