Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-02-01 18:50:09
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Nesting articles
I need to pull in a short tagline at the end of articles. The tagline itself is saved as an article, so it can be easily updated.
Following suggestions from an earlier thread, which I bookmarked at the time, I tried this in my article form:
<h2><txp:title /></h2>
<txp:upm_article_image form="image_caption" />
<txp:body />
<txp:article_custom form="body-only" id="74" />
and in form body-only: <txp:body />
But without success. (<txp:article />
does, but that’s of no use.)
I also installed ied_doarticle, but that only produces an error in 4.0.8 stating “[error: there is no Body in article A] “
Is there any other way?
Offline
Re: Nesting articles
Looks okay to me. Perhaps it’s because it’s in an article form (i.e. article_custom inside an article loop) and not in your page template?
Also, if you’re on 4.07+ you can simplify it to read <txp:article_custom id="74"><txp:body /></txp:article_custom>
.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2009-02-01 20:58:13
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Nesting articles
jakob wrote:
Perhaps it’s because it’s in an article form (i.e. article_custom inside an article loop) and not in your page template?
No, you can use article_custom as well in an article form as in an article itself. Have you looked at the tag trace?
Offline
#4 2009-02-01 21:12:50
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Nesting articles
jakob wrote:
Looks okay to me. Perhaps it’s because it’s in an article form (i.e. article_custom inside an article loop) and not in your page template?
Thanks Jakob,
that must be the reason, although Stephen from that older thread got it working. I’ve used similar approaches in headers, footers etc. without problems, but never in an article form before.
I didn’t quite understand you comment regarding the loop. I didn’t anticipate any problems, since I was calling a specific article through article_custom.
Offline
#5 2009-02-02 14:37:46
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Nesting articles
Problem solved! It was a classic case of self-sabotage:
The article I was trying to pull in via article_custom was still set to “hidden” ;-)
Offline
Pages: 1