Gallery.ss
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Previous 10 entries
- 1
- Page 22(current)
Hi RobboNoCash,
Can you paste your code files (.SS file and .PHP) using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
-helenclarko
Hi RobboNoCash,
Sorry, I'm a little slow today. Took me a little while to click onto whats happening here.
You are already referencing the image when you run your loop over it.
So, you can simply call $URL to get the images URL.
<% loop Picture %>
$URL
<div class="row service-list">
<div class="col-md-2 tp-service-block"><!-- tp Service Block Start-->
<div class="tp-thumb-pic"><!--service pic start -->
<a class="fancybox" rel="example_group" href="$URL"> <% if PictureSmall %><% loop PictureSmall %><img class="img-responsive" src="$URL" alt=""><% end_loop %><% end_if %> </a>
</div>
</div>
<% end_loop %>
The issue is that you need to loop through both $Picture and $PictureSmall.
-helenclarko
Hi helenclarko
Thanks a lot for your help I really appreciate it.
The URL for the picture is printing.
But the PictureSmall is not working, do you know why??
Thanks
Hi RobboNoCash,
Probably because the PictureSmall loop is being called from within the Picture loop... My Bad!
<% if Picture %>
<div class="row service-list">
<div class="col-md-2 tp-service-block"><!-- tp Service Block Start-->
<div class="tp-thumb-pic"><!--service pic start -->
<% loop Picture %><a class="fancybox" rel="example_group" href="$URL"><% end_loop %><% if PictureSmall %><% loop PictureSmall %><img class="img-responsive" src="$URL" alt=""><% end_loop %><% end_if %></a>
</div>
</div>
<% end_if %>
Hi
That is not working either, it is looping to the end of the Picture and all the PictureSmall is linking to the final Picture.
Thanks
Sure thing. To change it from post's featured images to page's...
1) Make a child theme.
2) Add in "template-imagegallery.php" to the child-theme.
3) Replace the following text:
<?php query_posts( 'showposts=60&post_type=post' ); ?>
with
<?php query_posts( 'showposts=60&post_type=page' ); ?>
Java training in chennai | Android training in chennai | Oracle dba Training in Chennai | Python Training in chennai
- Previous 10 entries
- 1
- Page 22(current)