Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-05 23:37:14

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

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

#2 2007-03-06 00:10:28

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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.

  1. [Best] If your article is presented inside a div, just style that div with a background image in your css.
  2. [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

#3 2007-03-06 00:17:09

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

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

#5 2007-03-06 00:24:22

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

#6 2007-03-06 00:26:06

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

#7 2007-03-06 00:33:30

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

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. &#10050;</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

#9 2007-03-06 01:19:25

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

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

#10 2007-07-16 00:44:28

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 141
Website

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

#11 2007-07-16 04:29:23

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Possible to insert an inline ornament before end of [txp:body /] tag?

Offline

#12 2007-08-08 08:47:26

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

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

Board footer

Powered by FluxBB