Jump to content

Homeslider


Recommended Posts

http://5.9.94.3/~fraben/

 

It's about default presta module "Homeslider". I changed style of bx-pager to fill right column with buttons. By default text in buttons is just slide number (1, 2 , 3, ...). I need slide title and description instead.

 

The code I need to change is in jquery.bxSlider.min.js in line 92:

{pagerString+='<a href="" class="pager-link pager-'+i+'">'+i+'</a>';}

 

I'm not so good with javascipt and really don't know how to change this second "i" with:

{$slide.title|escape:'htmlall':'UTF-8'}
<br>
{$slide.description|escape:'htmlall':'UTF-8'}

(code from homeslider.tpl)

Link to comment
Share on other sites

in the tpl file you can define javascript vars in foreach loop (exactly the same as for images in the slider)

 

 

var mydesc1 = 'description of slide1';

var mytitle1 = 'title';

 

then in the slider js file you can use these variables instead the simple i (you can dynamically add variables there based on "mydesc"+i and "mytitle"+i

Link to comment
Share on other sites

Where and how exactly am I supposed to implement this? I'm just messing it up :P

 

I added this in tpl's {foreach} section:

{assign var=mytitle  value={$slide.title|escape:'htmlall':'UTF-8'[spam-filter]
{assign var=mydesc value={$slide.description|escape:'htmlall':'UTF-8'[spam-filter]

 

But it's changing the same variable so it's always the last value at the end. How to combain this with .js's $i variable and then implement this combained variables in js's for loop?

Edited by Sharak (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...