Jump to content


Photo
- - - - -
Resolved

Bootstrap carousel shortcodes

carousel bootstrap shortcodes

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1 kristjan72

kristjan72

    Member

  • Members
  • 26 posts

Posted 04 October 2012 - 09:32 PM

Is it possible to customise the behaviour of the bootstrap carousel using the shortcodes? Sepecifically I want to have carousel set to pause unless the user clicks, so no auto sliding at all. I've tried this:

Please Login or Register to see this Hidden Content


also, for a different slider I would like to change the speed of the sliding:

Please Login or Register to see this Hidden Content


but the speed seems to remain constant whatever value I put after the data-interval attrinbute (the pause on hover does work!)

thanks

#2 James B

James B

    Advocate

  • Members

  • 5126 posts

Posted 05 October 2012 - 01:53 AM

Hi there,

The only thing i can see from your code is that the interval isn't enclosed in "". According to the bootstrap page you can pass intervals in the shortcodes.

Please Login or Register to see this Hidden Content



#3 kristjan72

kristjan72

    Member

  • Members
  • 26 posts

Posted 05 October 2012 - 10:06 AM

Oops. The no-closed quote marks were ok on my site, just messed up typing the code here on the forum post.

I made two carousel sliders, on the same page, one with the data-interval set to 1000, and the other set to 6000, but they both auto-scroll at exactly the same speed, looks like the default. Maybe the 'data-interval' is the wrong shortcode for that? I looked in class.shortcodes.php but couldn't find any shortcode that looked like it affected the speed

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts

Posted 05 October 2012 - 11:00 AM

I have just tried this and you're correct, but there is no mention of this type of functionality in our demo shortcode page. I will speak to one of our developers and reply here when I have more information.

#5 kristjan72

kristjan72

    Member

  • Members
  • 26 posts

Posted 05 October 2012 - 11:32 AM

thanks. I'll use the Quickslider in the meantime, although I prefer the bootstrap sliders look

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 05 October 2012 - 03:00 PM

Ok, sounds good. Do you need further assistance with anything else?

#7 kristjan72

kristjan72

    Member

  • Members
  • 26 posts

Posted 05 October 2012 - 07:14 PM

I do have this question:

I'm using this code (thanks to Danny) to for the blog page:

Please Login or Register to see this Hidden Content


and I want to do the same for other pages. I'd like to apply this same to different Page Templates (in this case Template 4). Searched class.template.php and it looks like the templates are simply labelled 1, 2, 3, 4, 5. I tried:

Please Login or Register to see this Hidden Content


but that didn't work. Any idea?

#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts

Posted 08 October 2012 - 06:41 AM

Hi

You can use the following classes for the templates.

  • Template | Default = .default .page-template-default
  • Template | 1 = .alpha .page-template-page-alpha-php
  • Template | 2 = .beta .page-template-page-beta-php
  • Template | 3 = .gamma .page-template-page-gamma-php
  • Template | 4 = .delta .page-template-page-delta-php
  • Template | 5 = .epsilon .page-template-page-epsilon-php
  • Template | Example = .example .page-template-page-example-php
So with that, you can do the following for template 4.


Please Login or Register to see this Hidden Content



#9 kristjan72

kristjan72

    Member

  • Members
  • 26 posts

Posted 08 October 2012 - 10:25 AM

thank you, works!

#10 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts

Posted 08 October 2012 - 11:02 AM

Also, I have spoken to one of our developers regarding the data interval and data pause and he informed me that these settings have not been implemented. However it should be fairy simple and will be added in the future.

I have resolved this topic.

#11 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts

Posted 08 October 2012 - 11:03 AM

The topic was marked as resolved.