64 Posts
Topy
7 years ago
5
Topic

Hello.

I'm trying to get the links of all thumbs to display in slideshow thumbnail... but i can't get the link. Can anyone help me?

<ul class="bxslider"> <?php foreach($cck->get( 'galerie_photo' )->value as $fx){ ?>

<li> <img src="/<?php echo $fx->value; ?>" title ="<?php echo $fx->image_title; ?>" /></li>

<?php } ?> </ul>

<div id="bx-pager"> <a data-slide-index="0" href="/"><img src="/<?php echo $fx->thumb; ?>" /></a> <a data-slide-index="1" href="/"><img src="/<?php echo $fx->thumb1; ?>" /></a> <a data-slide-index="2" href="/"><img src="/<?php echo $fx->thumb1; ?>" /></a> </div>

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
0
Level 1

See manual

64 Posts
Topy
7 years ago
3
Level 1

So .. i don't understand..

This doesn't seems to work... i just want to get the url of every thumb.. like i get for original image... Can you explain more ?

<img src="/<?php echo $cck->renderField('galerie_photo'); ?>" />

4229 Posts
Kadministrator
7 years ago
2
Level 2

Do var_dump($cck->get( 'galerie_photo' )->value)) to see what is inside your object. When you do foreach trough the object as in your code above you should be able to access thumbs with something like $fx->thumb1 

64 Posts
Topy
7 years ago
1
Level 3

Yes Klas, as you see i use $fx->thumb1... but is outside foreach and because of this it return me maxresdefault.jpg :( If i try to add in foreach, will not work slider... 

I'm just trying to learn mroe seblod and custom override :)

Edit: I find now a little bug and i don't understand why do this:

If foreach inslide <ul> tag... it display duplicate of some array ( images, last image and first image on start and end), if i use this:

<ul> <?php foreach($cck->get( 'galerie_photo' )->value as $fx){ ?> <li> <img src="/<?php echo $fx->value; ?>" alt="<?php echo $fx->image_alt; ?>" title ="<?php echo $fx->image_title; ?>" /></li> <?php } ?> </ul>

If i use only foreach, without ul and li: it display corectly only 3 images..

4229 Posts
Kadministrator
7 years ago
0
Level 4

You have a syntax error somewhere, probably some > is misplaced or so.. you will have to figure it out yourself

Get a VIP membership