Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
insert something at the last item of an image list
hard to describe, sorry for being unprecise in the thread title. what i’m looking for is a solution to insert an item at the last step of an image list so that the output looks like this:
<li><img src="img/2.jpg" alt="" /></li> <li><img src="img/3.jpg" alt="" /></li> <li><img src="img/4.jpg" alt="" /></li> <li><img src="img/5.jpg" alt="" /> SOME STATIC CODE SHOULD GO HERE</li>
i thought that i could easily handle this with the help of zem_nth but unfortunately it doesn’t work here. it would also be easy to make something like this in an article form:
<li><txp:upm_article_image /></li> <li>STATIC CODE HERE</li>
but the static code snippet has to be inside the last list item…
any ideas?
Offline
#2 2007-10-03 19:21:51
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: insert something at the last item of an image list
If these images are article images, maybe txp:if_last_article would help?
Offline
Re: insert something at the last item of an image list
the output above is generated from one article. one article has mulitple images associated, these images are then outputted as list items. so if_last_article doesn’t work here unfortunately…
Offline
#4 2007-10-05 10:44:35
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: insert something at the last item of an image list
You’d need some kind of plugin. There are similar plugins which insert something at the end of paragraphs.
Last edited by Mary (2007-10-05 10:45:17)
Offline