Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Today 01:39:51

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

End mark at end of body?

I’d like to add a special character (for example, a tilde) at the very end of each blog post similar to how magazines put an icon at the end of an article (an end mark?). For exampe, a blog post would end like this:

… with her fellow volunteers. ~

I suspect this has been explained in either the documentation or here in the forum. Where should I be looking for a solution?

Last edited by mistersugar (Today 01:40:09)

Offline

#2 Today 02:56:03

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,115
Website Mastodon

Re: End mark at end of body?

mistersugar wrote #339572:

I suspect this has been explained in either the documentation or here in the forum. Where should I be looking for a solution?

not sure if this is what you have in mind? But I end all my posts with a special char:
https://bicilogic.com/article/retro-cyclists

you could use
<div class=“post-footer”>&tilde;</div> ensuring there is no line break, using css, after the post.
I did it over 10 years ago and there may be more elegant solutions


…. texted postive

Offline

#3 Today 02:57:44

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,370
Website

Re: End mark at end of body?

Do you consider that endmark part of the content or is it strictly presentational?

In the first case you could add it as part of your article form template. In the latter case, CSS generated content is your friend, e.g.

article::after {
  content: '~'; 
  display: block; /* add if you want the endmakr on its own line */
}

Replace article with the container that wraps around the body of your article.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 Today 03:03:09

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,115
Website Mastodon

Re: End mark at end of body?

PS on end marks


…. texted postive

Offline

#5 Today 03:09:42

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

Re: End mark at end of body?

Thanks for the answers bici and phiw13.

I’m actually trying to do both of these.

Using CSS makes sense for the character that I want to show below each post (or in between two posts if an article list). I appreciate the tips.

Adding a character to the very end of a post seems harder: I want it to be inside of the txp:body tag but is that possible?

Offline

#6 Today 03:14:25

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,370
Website

Re: End mark at end of body?

mistersugar wrote #339576:

Adding a character to the very end of a post seems harder: I want it to be inside of the txp:body tag but is that possible?

I don’t think so. <txp:body /> just takes the content of what you write in the textarea. It has no attributes, according to the documentation.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#7 Today 03:17:00

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

Re: End mark at end of body?

phiw13 wrote #339577:

I don’t think so. <txp:body /> just takes the content of what you write in the textarea. It has no attributes, according to the documentation.

That’s what I figured. Late here so calling it a night. Thanks for being online to help!

Offline

#8 Today 10:30:34

etc
Developer
Registered: 2010-11-11
Posts: 5,367
Website GitHub

Re: End mark at end of body?

The trouble is that a typical body is composed of paragraphs and so on. Even if <txp:body wraptag="<+>~" /> works, it produces something like

<p>...</p>~

This makes ~ be displayed on the next line. You might try to style the last child of the body, or alter it with etc_query or smd_xml plugins.

Offline

Board footer

Powered by FluxBB