8 Posts
DaffRider
8 years ago
3
Topic

Hi all

I have a question about override template

I have create From include Groupx Fields (with different fields inside) i use Seb_One template 

in my article i have different instance of my groupx 

How create UL unordered list from my Groupx result in template override ?

MY Template code :

<?php foreach($cck->get( 'fab_videos' )->value as $gx){ ?>
<a href="/<?php echo $gx['video_fabricant_link']->value; ?>" data-mediabox="width[1000];height[563];controls[controls];src[<?php echo $gx['video_fabricant_link']->value; ?>];autoplay[autoplay]"><img src="/<?php echo $gx['video_fabricant_tbn']->value; ?>" alt="Voir la vidéo" /><span><?php echo $gx['video_fabricant_title']->value; ?></span></a>

How separate the result of my groupx to different <li>

<ul>

   <li>

<a href="/<?php echo $gx['video_fabricant_link']->value; ?>" data-mediabox="width[1000];height[563];controls[controls];src[<?php echo $gx['video_fabricant_link']->value; ?>];autoplay[autoplay]"><img src="/<?php echo $gx['video_fabricant_tbn']->value; ?>" alt="Voir la vidéo" /><span><?php echo $gx['video_fabricant_title']->value; ?></span></a>

   </li>

   <li>

<a href="/<?php echo $gx['video_fabricant_link']->value; ?>" data-mediabox="width[1000];height[563];controls[controls];src[<?php echo $gx['video_fabricant_link']->value; ?>];autoplay[autoplay]"><img src="/<?php echo $gx['video_fabricant_tbn']->value; ?>" alt="Voir la vidéo" /><span><?php echo $gx['video_fabricant_title']->value; ?></span></a>

   </li>

</ul>

Sorry for my bad english im french ;)

Thank you so much for your help

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
2
Level 1

HI,

try first if this plugin can help you without the need for overrides -

http://www.seblod.com/store/extensions/25890

Otherwise you need to create a loop inside ul, not outside, something like this:

<ul>
<?php foreach($cck->get( 'fab_videos' )->value as $gx){ ?>
   <li>
   <a href="/<?php echo $gx['video_fabricant_link']->value; ?>" data-mediabox="width[1000];height[563];controls[controls];src[<?php echo $gx['video_fabricant_link']->value; ?>];autoplay[autoplay]"><img src="/<?php echo $gx['video_fabricant_tbn']->value; ?>" alt="Voir la vidéo" /><span><?php echo $gx['video_fabricant_title']->value; ?></span></a>
   </li>
<?php } ?>
</ul>
8 Posts
DaffRider
8 years ago
0
Level 2

Thx you Klas for your help

i test that now :)

8 Posts
DaffRider
8 years ago
0
Level 2

Hi Klas

thx you for your tips workfine with override technic

you have the same solution with dynamic checkbox ?

i have a form with dynamic checkbox. how call dynamic checkbox in template override like group x ?

Thank you lot of for your help

Get a Book for SEBLOD