Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Disappearing article titles when using textpattern tags in content
Hi,
I’m trying to include a list of categorised links within the content of an article on my site. So under the write tab I type something like this
Have a look at our fiction reviews:
<code><txp:article_custom form=“listings” category=“reviews” section=“fiction” sortby=“Posted” sortdir=“desc” listform=“listings” /></code>
Which all works well – I get the text and the list of categorised links – but for the fact that the article title disappears from view in the page. When I look at the source of the page I find that where there had been a title between my header tags, I just have <h3></h3>
with nothing in-between.
Any ideas as to what I am doing wrong? Does textpattern object to mixing article content and textpattern tags?
Best wishes,
Will
(Edit: updated to help display your posted code properly. :) -Mary)
Last edited by Mary (2005-12-20 22:11:25)
Wayward thoughts on the Buddhist Way: thinkbuddha
Offline
#2 2005-12-20 22:15:28
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Disappearing article titles when using textpattern tags in content
“Does textpattern object to mixing article content and textpattern tags?”
Yes and no. That particular tag only works in the context of a page, rather than an article.
Does the list need to occur within the article itself, as opposed to within an article form?
Offline
Re: Disappearing article titles when using textpattern tags in content
Thanks for the reply, Mary. No, the list can go in an article form, but I have the same problem. So in my article form called reviews_writing I have something like this:
<code>
<txp:article_custom form=“listings” category=“reviews” section=“Writing” sortby=“Posted” sortdir=“desc” listform=“listings” />
</code>
And then in my article content I have this:
<code>
Blah di blah di blah…
<txp:output_form form=“reviews_writing” />
… di blah di blah
</code>
And I still have a disappearing title. Odd. Any ideas?
Best wishes,
Will
Wayward thoughts on the Buddhist Way: thinkbuddha
Offline
Re: Disappearing article titles when using textpattern tags in content
You cannot call article-lists (article/article_custom) from within articles, this is because of an implementation detail (communicating via global variables). While I can appreciate that it sometimes would be nice to do so, I don’t think it’s likely that this will change in the very near future.
A workaround is to code your own plugin that makes a query and outputs your desired data.
Offline
Re: Disappearing article titles when using textpattern tags in content
Yikes! That’s quite a workaround for a php bonehead like me. But then, with the Christmas holidays on the way, I might be tempted to have a go… The other workaround is to simply code the links by hand.
Best wishes,
Will
Wayward thoughts on the Buddhist Way: thinkbuddha
Offline
Re: Disappearing article titles when using textpattern tags in content
If this isn’t messing anything else up how about placing your “h3” title at the top of the article body?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Disappearing article titles when using textpattern tags in content
Cheers for this, Stuart.
I tried it putting the h3 tag in the article body earlier, but I had underline styling on my h3 tags, and so I got two lines at the top of my article. However, with cutting out the underlines it works fine, so I think I’ll go with this and put up with the empty h3 tags in my code. Other workarounds will take far too much intensive labour at the moment to make them worthwhile.
Once the site is up and running, if I decide to find a more elegant solution then, I’ll have the time to do so…
All the best,
Will
Wayward thoughts on the Buddhist Way: thinkbuddha
Offline
Re: Disappearing article titles when using textpattern tags in content
Is this list something that appears in all your articles? The reason I ask is because I think you may have misunderstood what Mary was suggesting which is to call your listing form inside your article form template rather than the article itself.
Last edited by thebombsite (2005-12-21 16:51:23)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Disappearing article titles when using textpattern tags in content
Aha! Got you! A small road to Damascus moment. If I copy the default article form, then I can simply append the listings to this and save it as something like default_listings… then I can override the default form for the article and everything works fine.
I’ll get the hang of all this eventually… Thanks a bundle for your help, folks! (And happy Christmas too…)
W
Wayward thoughts on the Buddhist Way: thinkbuddha
Offline