Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2012-09-13 00:49:34
- asashi
- New Member
- Registered: 2012-09-08
- Posts: 9
Re: Simple gallery with page numbers and borders
That is pretty much everything in my “default” page, including my layout.
I basically want to create something like this.
http://i50.tinypic.com/29azf9i.png
It would be nice to start with a category page, mentioning all of the image categories I created with links to a small gallery for each.
Minx
Hello Kitty
Holiday
Calgel Toes
Etc
And on each page, a simple layout with maybe 10 images to a page with a << Prev 1 2 3 4 Next >> type of link.
Then when clicked, shows up in the same layout with caption at the bottom.
Very simple… so easy to to with html for me. But I need it to be simplified for my boss and I thought Textpattern would be a quick solution to help her upload photos easier. I don’t understand Textpattern language at all…
Offline
#14 2012-09-13 00:49:36
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Simple gallery with page numbers and borders
From this part here
<tr><td id="content">
<div class="hfeed">
<txp:article limit="5" />
</div>
</txp:if_category>
remove </txp:if_category>
and try the outcome.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#15 2012-09-13 00:50:51
- asashi
- New Member
- Registered: 2012-09-08
- Posts: 9
Re: Simple gallery with page numbers and borders
And yes to all of your checks.
Offline
Re: Simple gallery with page numbers and borders
asashi
Hmm, a couple of things:
- Where’s the opening
<txp:if_category>
for the closed tag that appears under the<td id="content">
? (btw, you have two td tags with the same id which won’t validate, but that’s a side issue) EDIT: Uli beat me to it. - The txp:if_category tag doesn’t take a
type="test"
attribute. It needs to be one of the four defined content types, as shown in the tag documentation there. - EDIT: You’ve also got a
<txp:article>
tag above your<txp:images>
which is probably playing havoc with the pagination. Chop it out for now.
Try fixing those to start with and see what happens.
Last edited by Bloke (2012-09-13 01:00:24)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#17 2012-09-13 00:54:34
- asashi
- New Member
- Registered: 2012-09-08
- Posts: 9
Re: Simple gallery with page numbers and borders
uli wrote:
From this part here
<tr><td id="content">
<div class="hfeed">
<txp:article limit="5" />
</div>
</txp:if_category>
remove </txp:if_category>
and try the outcome.
Nothing happened. Just a blank page…
Offline
Re: Simple gallery with page numbers and borders
asashi wrote:
I don’t understand Textpattern language at all…
It’ll take a little bit of tinkering to get your head round it if you’re not familiar with the syntax. The tag docs I linked to will help to show you what tags are available and what attributes each can take. Then there’s the Orientation section of the manual which will help show you how the various Textpattern building blocks interact.
The good news is if you’re familiar with HTML then you’re already quite a long way towards learning Textpattern.
Last edited by Bloke (2012-09-13 01:00:53)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#19 2012-09-13 01:07:21
- asashi
- New Member
- Registered: 2012-09-08
- Posts: 9
Re: Simple gallery with page numbers and borders
This is what it looks like now.
http://i.imgur.com/RDly0.png
url is mysite.com/category/image/calgel
The thumbnails are so far apart, I don’t understand why. And it doesn’t link to the regular size of the image.
I give up for now. Thank you all for your help…
Offline
Re: Simple gallery with page numbers and borders
asashi wrote:
The thumbnails are so far apart, I don’t understand why.
That can be altered with CSS — the <div>s are probably causing that behaviour so you’ll need to put some rules in place to float the images side by side. That’s not my area of expertise but there are plenty of people here who can help. The good news is that you have images showing up!
And it doesn’t link to the regular size of the image.
Yeah, we’re taking this one step at a time. If you look at the code inside the <txp:images>
container:
<div class="thumb"><txp:thumbnail /></div>
<div class="caption"><txp:image_info /></div>
There are no HTML anchors anywhere in sight. What’s happening is it’s showing the thumbnail and the caption for each image, and that’s it. What you need to decide next is what exactly you want it to do! For example, do you want the full size image to open in a popup lightbox; do you want it to open in its own URL; do you want it to be embedded in a “full size” placeholder somewhere on the page; the possibilities are endless. Whichever one you choose will lead to a different set of HTML markup required to make it happen.
You’ve then got other things to consider like using txp:category_list to render a list of image categories — perhaps in a sidebar or something — so visitors can click on them to reach the gallery pages.
Lots of options. Lots of decisions. Lots of fun!
Last edited by Bloke (2012-09-13 01:18:15)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Simple gallery with page numbers and borders
Clearly we need a thorough, detailed, image gallery tutorial for the magazine. Anyone up for the challenge (besides me, I’ve got enough to write already)? Contact me via the forum, or whatever.
Offline
Offline