Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Side notes in Textpattern?
Following Anoke’s suggestion and going back to the original thread regarding the Gozo post that Martin recalled, I finally tried seeing if txp:article_custom might possibly work within the body of another article, and – pleasant surprise (to me at least) – it does.
That means that the dive log entries/GTD tips etc. (which are indeed content, but which I want to place within the flow of a longer post) could be posted as articles themselves, presented in a form and styled as required, then dropped into the main feature. Much better than having them posted as static HTML content within the main article as at present, as Martin says.
Example here (the styling is a bit off on the rest of the page, but you get the idea.)
I’ll think i’ll use this going forward, unless anyone has any reasons to avoid it…? (I guess circular references – articles including one another – could get interesting.)
Rgds,
Stephen
Last edited by stephent (2007-02-15 22:32:01)
Offline
#14 2007-02-15 22:48:43
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Side notes in Textpattern?
Stephen, that sure is a pleasant surprise to me, too.
Re the structure of the green boxes’ content I suppose the heading and body text are the respective heading and body of the article while the dive no and the detail information at the bottom are retrieved from custom fields?!
Would you mind posting the custom form you used?
Thanks very much for taking the time to experiment.
Cheers Martin
Last edited by masa (2007-02-15 22:49:32)
Offline
Re: Side notes in Textpattern?
travholt, it looks like ied_doarticle might do what you want—it’s supposed to let you insert one article’s body into another. If you have a CSS class for your sidenotes, you should be able to do something like:
<div class=sidenote><txp:ied_doArticle id="1" /></div>
Note that I don’t use this plugin—I have no idea how well it works.
Offline
Re: Side notes in Textpattern?
Hi Martin
Well, at the moment all I did was create an article form called “article_body” that contains just <txp:body />. But as you say, I could use the title for dive site name, body for the description and custom fields for the other attributes – just haven’t got round to that yet.
Having said that, I’m going to need more than 10 custom fields, given that I’m using 7 already. I’m sure I saw a plug-in for that already somewhere…
Of course the nice thing about this approach is that now I can reuse this content elsewhere – e.g. I guess I could type up all my dive log entries, post them as articles to a dive log section, then selectively drop them into longer posts. Of course the probability of that happening is close to zero, given my average posting rate!
Cheers,
Stephen
Offline
#17 2007-02-15 23:07:23
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Side notes in Textpattern?
stephent
You could try out the sed_pcf plugin that offers a whole dataset in a single custom field.
— Steve
Offline
Re: Side notes in Textpattern?
Steve – looks very useful. I’ll see how far I can get with it over the next couple of week.
S
Offline
Re: Side notes in Textpattern?
atbradley wrote:
travholt, it looks like ied_doarticle might do what you want—it’s supposed to let you insert one article’s body into another. If you have a CSS class for your sidenotes, you should be able to do something like:
<div class=sidenote><txp:ied_doArticle id="1" /></div>
Note that I don’t use this plugin—I have no idea how well it works.
Yay, thanks! Exactly what I wanted! I knew someone must have made something like what I wanted.
I have now made a new hidden section called “sidenotes” where I can put them all (well, there’s just one so far). And I’ve made a snippet in TextExpander so I type “gtdsb” to insert the ied_doArticle code for it. I’m a happy Textpatterner now. :-)
(And sorry for the late reply, I didn’t get notified of new posts in this topic until now.)
Offline