Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-11-25 04:00:49

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Gallery landing page - list of galleries

This ras_if_category_type_v4.0.7.txt works as you would like. This is new and untested, but it is pretty straight forward and shouldn’t create problems for you. If the question of the if_category tag only working for articles has to do with the “no article tag” warnings, I’m not sure that this will help – I’m still a bit confused about the problem there though.

Offline

#14 2008-11-25 04:37:21

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Gallery landing page - list of galleries

Great! Thanks so much, Rick. Didn’t think you were actually going to write one hic et nunc :-)

However, I still get this tag error when the category (i.e. gallery) is selected:

->  Textpattern Notice: Page template photoindex2 does not contain a txp:article tag  on line 474
C:\xampp\htdocs\judithinglese.dev\textpattern\publish.php:474 trigger_error()
C:\xampp\htdocs\judithinglese.dev\index.php:40 textpattern()

here’s my current code:

<txp:if_category>
<txp:ras_if_category_type type="images" name="gallery">
<txp:output_form form="render_gallery" />
</txp:ras_if_category_type>
<txp:else />
<txp:article form="gallerylist" />
</txp:if_category>
</div>

and this is the relevant bit from the tag trace:

<txp:if_category>
	[<txp:if_category>: true]
	<txp:ras_if_category_type type="images" name="gallery">
		[SQL (0.000760): select * from txp_category where name='gallery' and type='images']
		[<txp:ras_if_category_type type="images" name="gallery">: false]
	</txp:ras_if_category_type>
</txp:if_category>

even though the url is http://www.judithinglese.dev/gallery?c=gallery

Last edited by JanDW (2008-11-25 05:15:42)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#15 2008-11-25 04:41:10

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Gallery landing page - list of galleries

Els wrote:

<txp:if_category>
   // no category page
<txp:else />
   // here's a (any) category page
</txp:if_category>

Shouldn’t it be:

<txp:if_category>
   // here's a (any) category page
<txp:else />
   // no category page
</txp:if_category>

BTW Els, no apologies needed, fortunately my name isn’t André Hazes or Eddy Wally… that might have scarred me for life. ;)

@ bloke : thanks for your concise and well-written explanation. I messed up earlier, but I think I realize my mistake, so I might look into your method again later.

@ jstubbs : I’m not understanding your method… how does the landing page tie in with the rest?

Last edited by JanDW (2008-11-25 05:14:25)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#16 2008-11-25 05:43:34

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Gallery landing page - list of galleries

The tag error is telling you that an article tag has not been encountered in the template, if you are only rendering images when you call an image category that will, in fact, be the case. Those may be something you can disregard in production mode. Try “image” rather than “images” for the type; it’s unforgiving about those.

Last edited by rsilletti (2008-11-25 05:44:57)

Offline

#17 2008-11-25 07:40:28

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Gallery landing page - list of galleries

As Rick states, you need to set category type=“image” rather than images. I edited my post to add the form contents. Its a good starting point for your gallery.

The gallery I have (its on localhost so I can’t show it to you!) currently uses jQuery to run through the thumbnail images. As it runs through the thumbs, the large image changes and the image caption is displayed.

Its not exactly what you want, but can form the basis of it, since the categories work exactly as you would like them to (as far as I understand your needs).

When landing on section = photos, the code displays a gallery called slideshow. If in a category page, the gallery displays the images from the image category in question. If you try it, it works ;-)

Offline

#18 2008-11-25 16:36:09

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Gallery landing page - list of galleries

Rick: Thanks, it works!

Jonathan wrote:

(as far as I understand your needs)

Ehm, you did. I understand now, guess it was late for me too. :-)

Thanks again to all for truckloads of great advice.

Last edited by JanDW (2008-11-25 16:36:32)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#19 2008-11-25 16:38:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Gallery landing page - list of galleries

JanDW wrote:

Els wrote: (…) Shouldn’t it be: (…)

OMG I can’t believe I wrote that! Of course you’re right! Must have been that song distracting me…;) (this would never have happened if your name had been Eddy Wally…)

I’ll go and edit that post before someone actually believes me ;)

Offline

#20 2008-11-25 17:03:54

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Gallery landing page - list of galleries

Els wrote:

… before someone actually believes me ;)

Too late …I did :)

Last edited by JanDW (2008-11-25 17:04:24)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#21 2009-10-24 01:17:13

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Gallery landing page - list of galleries

Hi!

I’m relatively new to textpattern, I’ve been searching the web for a solution for this issue but I couldn’t find it, so sorry if has been asked a lot before. And I’m sure it’s pretty simple.

I want to make a list of image category list, though I can’t find the tag.

Thank you in advance :)

Offline

#22 2009-10-24 01:32:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Gallery landing page - list of galleries

txp:category_list
<txp:category_list type="image" />


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#23 2009-10-24 02:28:47

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Gallery landing page - list of galleries

It was easy indeed, I feel stupid :)

Thank you very much.

Offline

#24 2009-10-24 15:26:59

Malize
Member
From: Barcelona
Registered: 2007-08-28
Posts: 77
Website

Re: Gallery landing page - list of galleries

Then, I have a second question.

I read all the content in this thread, and I understand that is based on a plugin that no loger exists (or I can’t find).

I’m trying to make a <txp:if_category> based on images, although I dont know how to do it, and also wrap the category.

Like: if category=“cat1” do x, if category=“cat2” do y, else…

I don’t know if I made myself clear enough :P

Thank you in advance

Offline

Board footer

Powered by FluxBB