Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2015-04-13 19:42:14
- pierlu
- Member
- Registered: 2014-08-12
- Posts: 153
form galleria
Salve sto provando a realizzare una galleria con il plugin smd_gallery:
nella pagina ho usato questo tag
<txp:smd_gallery category=“compleanni” form=“gallery” />
form gallery
<ul>
<li>
<a class=“popup” href={url}>
{thumburl}
</a>
</li>
</ul>
Cosa sto sbagliando?
Offline
Re: form galleria
Cosa sto sbagliando?
= What I am doing wrong?
Quite a lot unfortunately. A few tips:
- You have no
img
tag at all, so you simply won’t see any images. - You need quotes around the href attribute.
- You have the
ul
container tags in the repeating form, so you will get lots of unordered lists with only one item. Instead you want one pair oful
tags wrapped around the repeating sections and your li inside. An easier way is to usewraptag="ul"
andbreak="li"
.
Suggested code:
<txp:smd_gallery category="compleanni" form="gallery" wraptag="ul" break="li" />
And the gallery form:
<a class="popup" href="{url}"><img src="{thumburl}" alt="{alt}" /></a>
You’ll need some javascript to show the popups for you but I assume you have something in place already.
Finally, a few well-meaning tips on how you can try and solve the simple things before posting here:
- You’ve asked the same or similar question before. Try posting in the same thread, and examine what has been suggested there before so you can learn from it.
- Try looking at the source code that you output. That will give you lots of clues to what is happening.
- Run your source code through the w3c validator. If your site is not online, you can also cut and paste your source code into the tab called “Validate by direct input”. Then click “validate” and it will help you identify many of your very simple errors.
- Look at the examples in the plugin help. Stef (smd) is brilliant and provides lots of code examples in his plugin help that you can copy and adapt. You would immediately see how you should be using the {thumburl} replacement tag.
And finally finally, a few tips on how you can make things easier for us to help you:
- If your site is online but not working, post a link to it so that we can see the code that it outputs. At the moment all we can do is make intelligent guesses, wait for your answer, then make more intelligent guesses, wait for your answer, etc. etc.
- Use the
bc. your code goes here
to post your code so that it is readable for us. My code line above looks like this:bc. <txp:smd_gallery category="compleanni" form="gallery" wraptag="ul" break="li" />
with a new line in front and after it. It’s really easy to do, and it makes life easier for us. More details on txstyle.org.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2015-04-13 22:50:55
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: form galleria
Thank you jakob for summarizing your “well-meaning tips” list.
Offline
Pages: 1