Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
data-popup - how to get article image href
Hello, I have a gallery feature with code like this
<a href=“pic.jpg” class=“thumb” data-popup title=“some title”>
Key feature here is data-popup, which makes the image popup in a popup thingy, without data-popup image opens on a new page. The way I see it is that I need to get a URL of an article image and assign it to href, same for title. So how to do that?
Offline
Re: data-popup - how to get article image href
Here’s a method
<txp:images id='<txp:custom_field name="article_image" />'><txp:image_url /></txp:images>
and implementing it in your code
<txp:article>
<a href="<txp:images id='<txp:custom_field name="article_image" />'><txp:image_url /></txp:images>" class="thumb" data-popup title="<txp:article_title />">
</txp:article>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline