Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2012-01-22 17:06:23
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
One article to display in two Sections? Don't understand
(There is every chance I’m being dense, but …)
I’d like to display one article in two different Sections. I use the stw_category_tree plugin to create my category page menus. I’ve searched and seen folks refer to using “article_custom” to put an article in two section, but I don’t understand just how I’m supposed to do it.
I can use this for my hard-coded dropdown menu bar:
mywebsite.com/?id="652"&s=About+Us
… But this won’t work for the dynamically created menus (via stw_category_tree) on the category pages.
One poster said to create a new article & put this in its body:
<txp:article_custom id="652" /><txp:body /></txp:article_custom>
But I got a blank page with a php error msg about space allocation.
Any help in lifting the fog surround me would be greatly appreciated! Vicki
Offline
Re: One article to display in two Sections? Don't understand
Hi Vicki
did you try
notextile. <txp:article_custom id="652" /><txp:body /></txp:article_custom>
If it still returns an error can you post the exact error?
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 2012-01-22 19:44:25
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
Re: One article to display in two Sections? Don't understand
Tried it with the “notextile.”, still got the error. Sorry I should have posted the error before, it is:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 24 bytes) in /var/www/html/library/txp/textpattern/publish.php on line 978
Offline
Re: One article to display in two Sections? Don't understand
Seems like a loop. If you put that to article ID#652’s body (same article you are calling with the article_custom), you will get circular reference, a loop that never ends. When that code is executed, article #652 calls article #652, which then proceeds to call the same article, which then calls the same article, which then calls the same article, which then calls the same article…
Or, wait, is that the exact syntax, because the code you posted is invalid. There is an extra closing tag pair. The article_custom is self-closing. Instead of what you posted, it should either be;
<txp:article_custom id="652"><txp:body /></txp:article_custom>
Or, using a form;
<txp:article_custom id="652" form="myForm" />
The error in syntax would also cause the loop. Your body tag would endlessly call a body. (body tag calls a body tag […] and so on).
Last edited by Gocom (2012-01-22 21:47:30)
Offline
#5 2012-01-22 21:47:02
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
Re: One article to display in two Sections? Don't understand
I’m not sure I understand completely. I have that little line of code in a new article, id=675. Why is it looping on the other article id=652 referenced by article_custom??
Thanks!!
Offline
Re: One article to display in two Sections? Don't understand
vickilh wrote:
I’m not sure I understand completely. I have that little line of code in a new article, id=675. Why is it looping on the other article id=652 referenced by article_custom??
I’ve edited my post. If that is the exact code, then that would be a problem too. There is a syntax error (the article_custom is self-closing) which would cause your body tag to call a body tag, which then goes on for ever in an endless loop.
Offline
#7 2012-01-22 21:50:33
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
Re: One article to display in two Sections? Don't understand
(I saw your edited reply after I sent my last post.)
AHA! I tried your first suggestion and that worked!!
code <txp:article_custom id="652"><txp:body /></txp:article_custom>
Thanks a bunch!
Offline