Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2014-12-23 15:16:56
- pierlu
- Member
- Registered: 2014-08-12
- Posts: 153
slideshow smd gallery
Should I make a slideshow, I chose to do it with the plugin smd_gallery. I created this form of Textpattern:
<div class = "slideshow">
<img src = "<txp: site_url />images/{id#2}.jpg"
alt = "alt {# 1}" width = "{width} # 1" height = "{height # 1}" />
<img src = "<txp: site_url />images/{id#3}.jpg"
alt = "alt {# 1}" width = "{width} # 1" height = "{height # 1}" />
<img src = "<txp: site_url />images/{id#4}.jpg"
alt = "alt {# 1}" width = "{width} # 1" height = "{height # 1}" />
</ div>
Of course I’ll have to create a js code. Can you help?
Offline
Re: slideshow smd gallery
Hi pierlu you could use some of the free jquery galleries out there. You may start with this page. You may find that no plugin is needed and you will be able to set up a gallery using native tags.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: slideshow smd gallery
smd_gallery was great in the earlier versions of textpattern but, as Yiannis mentioned, you can now make gallery code very easily using the in-built tags and you don’t need the plugin:
- You can make an image gallery totally without javascript using txp:image_display and txp:image_index. This method reloads the page.
- And you can fashion your own gallery/slideshow code exactly how you want it using txp:images, txp:image_url and txp:image_info.
By way of example: to generate the standard galleria slideshow output as described here, you’d do the following:
<txp:images id="2,3,4" wraptag="div" class="galleria">
<a href="<txp:image_url />">
<img src="<txp:image_url thumbnail="1" />"
data-title="<txp:image_info type="caption" />"
data-description="<txp:image_info type="alt" />">
</a>
</txp:images>
You can tell txp:images
what you want to show, e.g. images in a category, a list of ids, images by name, author etc. – see the docs. You can also make it use infos you’ve placed in the article image field (simply leave out id attribute and it will look there first as default).
PS: You often quote code with lots of spaces around the “=” signs, quotes, after colons etc. That can cause you lots of problems and you’ll spend less time hunting for bugs if you remove them. In your code it should read txp:site_url />
(no space after the colon) and <img src="filename.jpg"
and width="250px"
and alt="image description"
(no spaces around the equals sign or quotes).
TXP Builders – finely-crafted code, design and txp
Offline
#4 2014-12-23 18:07:17
- pierlu
- Member
- Registered: 2014-08-12
- Posts: 153
Re: slideshow smd gallery
The result is that I got for now is the three photos above each other, maybe I will have to act with the css and js?
Offline
Re: slideshow smd gallery
Hello!
Is it possible to to set up a gallery with one thumbnail / image and when one clicks on it, one gets all pictures from the gallery?
If I use the above code and limit images to 1 – I get only one picture out of gallery – something like here http://europlastplus.by/test/ otherwise I get all or several pics depending limits.
Offline
#6 2015-01-20 13:57:08
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,304
Re: slideshow smd gallery
admi, I’ve too little time right now to really investigate your needs, so just a pointer over to jsoo’s website with some gallery examples and TXP code (click deeper there, it’s worth it!) Hope it helps or at least re-starts the discussion here.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: slideshow smd gallery
uli wrote #287556:
…so just a pointer over to jsoo’s website with some gallery examples and TXP code (click deeper there, it’s worth it!) Hope it helps or at least re-starts the discussion here.
wow. neat! i can make use of this. a hidden jewel. ( or more correctly a nice find! )
…. texted postive
Offline
Re: slideshow smd gallery
uli wrote #287556:
admi, I’ve too little time right now to really investigate your needs, so just a pointer over to jsoo’s website with some gallery examples and TXP code (click deeper there, it’s worth it!) Hope it helps or at least re-starts the discussion here.
well. i have found the solution somewhere on the forum hidden deep inside. it was about tag display:none that hides the rest of gallery pictures. something like that if anyone needs:
<txp:images category='<txp:custom_field name="gallery" />' break="" limit="1">
<a class="frame lightbox" data-title="<a href='<txp:image_url />'><txp:image_info /></a>" data-gallery="<txp:custom_field name="gallery" />" data-img="<txp:image_url />" href="<txp:image_url />">
<img src="<txp:image_url thumbnail="1" />"
data-title="<txp:image_info type="caption" />"
data-description="<txp:image_info type="alt" />">
</a>
</txp:images>
<span style="display:none;">
<txp:images category='<txp:custom_field name="gallery" />' break="" offset="1" limit="999">
<a class="frame lightbox" data-title="<a href='<txp:image_url />'><txp:image_info /></a>" data-gallery="<txp:custom_field name="gallery" />" data-img="<txp:image_url />" href="<txp:image_url />">
<img src="<txp:image_url thumbnail="1" />"
data-title="<txp:image_info type="caption" />"
data-description="<txp:image_info type="alt" />">
</a>
</txp:images>
</span>
Offline
Pages: 1