Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-20 03:25:15

neutrino
Member
From: East of the Diablo Range
Registered: 2005-06-16
Posts: 134
Website

Including article body inside another article

Puzzle wizards—

Here’s the idea.

Content comes in pieces and is assembled piece by piece, like a collage or an assemblage. Ideally content could be re-combined and re-presented in multiple articles (yes this could be redundant—think of it as a study or a series of angles on a subject).

I’m looking for a way to store and include pieces of content (perhaps quotations or bullet points) in multiple articles but without having to hardcode the actual content sources except in the actual articles that include the content. Think of the need to repeat yourself but wthout wanting to re-type the statement again.

I’m looking for a way to pass the id of an article from the body section of an article and have it return the body (or excerpt) of another article. It’s important to be able to store once (using tXP databasing features) and include at random.

Something like: <code><txp:article id=“6” display=“body” /></ code> as the content of the article under construction.

All I want is to call a particular article database field from inside an article. I need to call that field from within an article without resorting to hardcoding in a form or a template. It needs to be able to be an easy and repeatable user process. Like we can include an image.

A simpler way of putting this might be: Can we include portions of articles in other articles like we include images in articles and if so how?

Do I need to write a php script to do this? It will be so wonderful if the solution is simple and obvious to one of you. I’ve been beating my head against this forum for some time . . . Danke in advance.

Offline

#2 2006-01-20 03:50:31

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Including article body inside another article

I don’t not if txp:article_custom can be parsed in article’s body. Try it.

Build a form with only the body in it, then use <txp:article_custom form"only the body" id="69" /> .

Or maybe there’s some things too look with the override.form tool.

Offline

#3 2006-01-20 13:26:08

neutrino
Member
From: East of the Diablo Range
Registered: 2005-06-16
Posts: 134
Website

Re: Including article body inside another article

Thanks Jeremie. I tried that and it didn’t work. I’ll check into the form override feature. It seems like such a simple thing—the ability to customize an artticle page in much the same manner as we customize the site . . .

Offline

#4 2006-01-20 16:55:03

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

Re: Including article body inside another article

One thing a person can do, of course, it add those pieces of content to a “misc” Form and use the custom Tag where that piece of content is wanted. You still only write once, store in one place, and it’s available anywhere you need it. The difference, of course is it’s not written as an article component (in this case “body”) where it would be more practicle for the workflow, but rather in the Forms panel box. Of course the other drawback is potentially a big collection of custom Forms, and as it is now a better Form indexing scheme is needed in that admin panel.

Last edited by Destry (2006-01-20 16:56:08)


The text persuades, the *notes prove。

Offline

#5 2006-01-20 18:16:21

neutrino
Member
From: East of the Diablo Range
Registered: 2005-06-16
Posts: 134
Website

Re: Including article body inside another article

> Destry wrote:

> One thing a person can do, of course, it add those pieces of content to a “misc” Form and use the custom Tag where that piece of content is wanted.

I thought of this, Destry but it “feels” so counter-intuitive not to mention the nightmare of the form admin area with 100 or more “forms” all containing content. Has there be any discussion of this type of “snippet” functionality/storability option that you know of?

Offline

#6 2006-01-20 18:27:15

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,021
Website

Re: Including article body inside another article

Not that I’m aware of, but it’s an interesting question. As was mrdale’s…here.


The text persuades, the *notes prove。

Offline

#7 2006-01-21 03:14:35

neutrino
Member
From: East of the Diablo Range
Registered: 2005-06-16
Posts: 134
Website

Re: Including article body inside another article

I tried the form override function and that didn’t seem to work. I’ve ended up with a php include to a plain text file stored in files . . . that might work for mrdales css issue too. I seem to recall, tho, one of the devs saying that using php like this was sort of backwards from how TXP is designed.

Offline

#8 2006-01-24 16:02:53

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Including article body inside another article

I’m looking for a way to include a list of articles in another section inside an article. I tried article custom, but no, it doesn’t work – it appears that an article custom tag inside an article “breaks” the article, and keeps it from displaying at all.

I get the feeling that any solution that’d work for neutrino would work for me too.


Yes, I have tried turning it off and on.

Offline

#9 2006-01-24 16:38:00

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Including article body inside another article

What you can do (I know it’s possible, I’ve done it) is put an article_custom tag in an article form. If you only want the article list to appear in one specific article, you can set override form for that article.

Offline

#10 2006-01-24 19:08:25

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Including article body inside another article

I was afraid you were going to say that! Unfortounately, I need the article custom output to be in the middle of the body (believe it or not!), but i see the way now: I’m going to create a form that just has the article_custom tag in it, then do a output_form from the article body.

Thanks!

Last edited by alesh (2006-01-24 19:15:28)


Yes, I have tried turning it off and on.

Offline

Board footer

Powered by FluxBB