Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2014-01-07 18:15:53
- lynx
- New Member
- From: Frankfurt/Main
- Registered: 2014-01-07
- Posts: 3
[solved] "category_list" given by article_url_title not working
Hi,
I wonder whether I made a mistake or I am missing something or there might be a bug.
I want to append an image gallery to an article by listing all children (titles and their images) of an image category which has the same name as the article.
Basically it works when I place the article-url-name manually:
<txp:category_list type="image" parent="article-url-name" form="umbria_galleryX"/>
But when I replace the article url name with the dynamic <txp:article_url_title /> tag, it doesn’t work although this one outputs the same string as I typed in manually.
Did I miss something?
Or might there be a bug?
Cheers,
Steffen
Last edited by lynx (2014-01-07 19:08:49)
Offline
Re: [solved] "category_list" given by article_url_title not working
Hi Steffen,
and welcome to txp.
It seems that you might have got the logic wrong:)
category_list
will only output the names of the categories and by using the parent attribute will only list the parent category name and its children.
I would try
<txp:images category='<txp:article_url_title /> '>
<txp:image />
<txp:image_info type="title" />
</txp:images>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2014-01-07 18:42:27
- lynx
- New Member
- From: Frankfurt/Main
- Registered: 2014-01-07
- Posts: 3
Re: [solved] "category_list" given by article_url_title not working
Hi Colak,
thanks for your quick reply!
well, my brain is definately bending around trying to find the appropriate txp-conform-logic.
But what I want is a gallery made up of all subcategories of that specific image-category (which corresponds to the article title). Your solution would only provide the images of the actual category – or is there a way to let txp output all images from the subcategories? … But then I guess I would have a problem displaying the titles of the subcategories between them‽
So my idea is that I get a list of that image-category and these list-elements are displayed by a form which displays the title and the images of that sub-category.
(Since category_list can display way more when displayed through a form! : ) )
And (arrggh!) it works very well as long as I replace <txp:article_url_title /> manually with the would-be output of it.
PS: Oh, and it wouldn’t even give me the textual list itself …
Last edited by lynx (2014-01-07 18:51:02)
Offline
Re: [solved] "category_list" given by article_url_title not working
I see… here’s an untested suggestion
<txp:category_list type="image" parent='<txp:article_url_title />' children="1">
<txp:image />
<txp:image_info type="title" />
</txp:category_list>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2014-01-07 19:05:51
- lynx
- New Member
- From: Frankfurt/Main
- Registered: 2014-01-07
- Posts: 3
Re: [solved] "category_list" given by article_url_title not working
AHA!!!
I replaced the “ “ with ‘ ‘ in my <txp:category_list type="image" parent='<txp:article_url_title />' >
-tag for the parent attribute and voila … it works!
Thanks for the hint!
… while my solution for my gallery was quite right! : )
Last edited by lynx (2014-01-07 19:06:46)
Offline
#6 2014-01-07 19:40:55
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: [solved] "category_list" given by article_url_title not working
lynx wrote #277881:
I replaced the “ “ with ‘ ‘
Yes, that’s a common user mistake. We should spread it far more in the manual than we do now. If you find any spots to mention it …
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [solved] "category_list" given by article_url_title not working
lynx wrote #277881:
Thanks for the hint!
… while my solution for my gallery was quite right! : )
Indeed it was… It was me who did not notice that you were using a form in there:)
I’m glad it was solved.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline