This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
317 Posts
Kenneth
4 years ago
6
Topic

Hi,

I've setup a field x to repeat a image field to create a image gallery. I really liked that I can just use typography of image to setup a lightbox. 

But that was until I changed to seb_minima to code it the way I want. 

I'm looking for tips on how to make the lightbox (image typography) work with custom template?

Get a Book for SEBLOD
317 Posts
Kenneth
4 years ago
3
Level 1

I solved this using modals from nonumber.nl

<div class="row galleri">
<?php foreach($cck->get( 'referanser_fx_bilder' )->value as $fx){ ?>
	<div class="col-xs-6 col-sm-4 col-md-3">{modal <?php echo $fx->value; ?>|group=galleri}<img src="/<?php echo $fx->thumb1; ?>" />{/modal}</div>
<?php } ?>
</div>

154 Posts
redback
4 years ago
2
Level 2

Hi,

here some variations of top of calling the image field.

$fx['your_image']->value; 

$fx['your_image']->image_alt; 

$fx['your_image']->image_title; 

$fx['your_image']->thumb1; 

$fx['your_image']->thumb2;

Check for more the array with the order (Content-View):

print_r($fields) and die;

Best Chris

71 Posts
Dgikar
4 years ago
1
Level 3

Hi All!

"your_image" - It's path to image?

154 Posts
redback
4 years ago
0
Level 4

Hi Dgikar, 

"your_image" is the name of FieldX field.

Best

12 Posts
Hozefa Saleh
3 years ago
1
Level 1

My Solution using default bootstrap 3 modal , in this "biz_gallery_group" is my field-x.

<?php foreach($cck->get( 'biz_gallery_group' )->value as $fx){ ?>
	<div class="col-xs-6 col-sm-4 col-md-3"><a data-toggle="modal" data-target="#<?php echo $fx->image_title; ?>" href="#"><img src="/<?php echo JURI::base(); ?><?php echo $fx->thumb1; ?>" /></a></div>
	<div class="modal fade" id="<?php echo $fx->image_title; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
	        <h4 class="modal-title" id="myModalLabel"><?php echo $fx->image_title; ?></h4>
	      </div>
	      <div class="modal-body">
	        <img src="/<?php echo JURI::base(); ?><?php echo $fx->value; ?>" style="max-width:100%;margin:0 auto;"/>
	      </div>
	    </div>
	  </div>
	</div>
	<?php } ?>
1222 Posts
Bucklash
3 years ago
0
Level 2

Nice

Keep em coming

Get a Book for SEBLOD