Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Possible to insert an inline ornament before end of [txp:body /] tag?
I would like to have an ornament such as ❂ be appended automatically to the end of each article, much like print magazines. Is there a way to do this with Textpattern? I imagine the code would say something like:
If this is the last closing tag of this article’s body, then insert ornament_entity immediately before it.
Cheers,
Simon
Last edited by mrdale (2007-03-06 00:04:31)
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Hi simon,
You are right, and there are two ways of doing it.
- [Best] If your article is presented inside a div, just style that div with a background image in your css.
- [OK, but semantically questionable] You could actually put the image into your article form with either a
<txp:image id="xx"/>
or a regular old image tag
Hope that helps.
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Thanks Dale, those are good suggestions.
What I’m trying to do is have an actual HTML entity that is selectable like normal text placed directly after the final period of an article, denoting the article’s end. From what I’ve found so far I believe that without hacking the <txp:body /> tag this is not possible to be done automatically.
I didn’t know about that use of <txp:image /> tag. Thank you for the tip!
Cheers,
Simon
Offline
#4 2007-03-06 00:22:47
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
What I’m trying to do is have an actual HTML entity that is selectable like normal text placed directly after the final period of an article, denoting the article’s end. From what I’ve found so far I believe that without hacking the <txp:body /> tag this is not possible to be done automatically.
Sure it is: just put the entity, and anything else you’d like, in your article form after the txp:body tag.
Last edited by zem (2007-03-06 00:23:30)
Alex
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
If you use an editor like tinyMCE, you might be able to use a callback function to insert the glyph/image.
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
>zem said
Sure it is: just put the entity, and anything else you’d like, in your article form after the txp:body tag.
Yep, but I’m guessing he wants it inside the last p-tag… right after the period no?
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Alex: Thanks for the suggestion, but I want the glyph to be positioned directly adjacent to the final period in the text, not below. I might stilll be able to find a way to do it with CSS floats, display:inline, etcetera, but I was wondering if there was a way without having to mess with the styles.
Here’s an example of how I want the source code to look like:
<p>End of article paragraph, with an ornament placed automatically directly after the final period and one space, but before the closing paragraph tag. ❂</p>
Dale: I’d rather stick with Textile, but I’ll explore the tinyMCE option.
Cheers guys,
Simon
Offline
#8 2007-03-06 01:07:22
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
A plugin could do it.
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Thanks Mary—I’ll see what I (and a friend) can do and will post anything we come up with here.
Cheers,
Simon
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Any solution to this? I’m trying something similar: I want to have a short entry form that includes the article permalink and comments invite before that last p tag. Suggestions?
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Plugin: wlk_article_glyph
Offline
Re: Possible to insert an inline ornament before end of [txp:body /] tag?
Thank you very much for this Walker. I agree that a tag that does not interfere with <txp:body /> would be best. Much appreciated at any rate.
Offline