Jump to content


Photo
- - - - -

Multiple Carousels on page via new shortcodes not working


  • Please log in to reply
7 replies to this topic

#1 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 05 July 2012 - 05:13 PM

I'm trying to use multiple carosels on the same page using the [pl_carousel] shortcode.
I'm using the syntax provided on this page:

Please Login or Register to see this Hidden Content



All of the first images are showing up, but the carosel is not transitioning on any of them, and only the last one has previous/next buttons.

Here's the html for my page:

Please Login or Register to see this Hidden Content



Framework 2.2.1

#2 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 05 July 2012 - 07:31 PM

Hey there, Each slide needs at least a caption in order to show the carousel. I made three on one page work by adding a caption to each slide. Nick

#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 05 July 2012 - 08:21 PM

Could you please elaborate as to your reasons for a rejection of Nick's reply? Thanks.

#4 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 05 July 2012 - 08:23 PM

Thanks Nick,

That is true, however I don't think it should be necessary to force people to use captions.

I did some digging and found the real problem right away which turns out to be an error in the carousel image function inside class.shortcodes.php. In a nutshell, the closing div of the carosel slide was only conditionally added to the content when there was a caption, otherwise it was left blank.

Please see my paste here:

Please Login or Register to see this Hidden Content



Making this change fixed my site as you will see in the URL now.

Thanks,

Evan

#5 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 05 July 2012 - 08:27 PM

Glad it worked out for you. The carousel shortcode wasn't really designed to operate without at least captions. If you want a slider without captions or titles, you can use QuickSlider or the Featured Slider. Nick

#6 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 05 July 2012 - 08:50 PM

Nick, I am familiar with the quickslider and feature slider sections, and for my use on this page they wouldn't work because my sliders are inserted into different table cells on the page - not really something I can do with those sections yet. Being able to add in multiple sliders on a page using a shortcode is a fantastic new feature from bootstrap and is the best pagelines native solution for my use. Regardless of how it was designed, my solution proposes a very simple fix so that the shortcode is capable of working with or without a caption for every image. As it is, any image added to the slider without a caption will break. Otherwise the required attribute should be documented, correct? I hope that this will be patched with the following releases of the pagelines framework. Evan

#7 Danny

Danny

    Is Awesome!

  • Moderators
  • 15194 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 05 July 2012 - 10:09 PM

Hi Evan, Thanks for the suggestion, I'm sure the devs will take it on board. I'm accepting your reply above for moderating purposes.

#8 bxbmedia

bxbmedia

    Advanced Member

  • Members

  • 79 posts
  • LocationAnn Arbor, MI

Posted 08 July 2012 - 03:03 PM

I was excited to see 'Fix Carousel to work without captions.' under bugs in the

Please Login or Register to see this Hidden Content

, but after upgrading I found that the problem still existed and that the problematic code inside class.shortcodes.php for pl_carouselimage was the same. I suppose perhaps this is a different problem that is mentioned in the notes as it doesn't specify carousel shortcode.

Anyways, I just wanted to post my updated solution for others to use in case they are looking for a solution. This doesn't require any editing of the core pagelines files - which is always no good.

This can be pasted into the child theme's/customize plugin's functions.php file.

See my paste here:

Please Login or Register to see this Hidden Content