Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-28 02:17:41
- marknumberm
- Member

- From: Minneapolis
- Registered: 2005-11-29
- Posts: 46
Code in article titles
Not sure if this is technically a bug (may have been done on purpose) but it certainly leads to problems: It’s impossible to style just part of the article title.
A very good reason one would want to do this is to refer to the title of a book, as in an article title like this: A Review of Lake Wobegon Days, by Garrison Keillor
If you use <code><cite></code> or <code><i></code>, the “<” and “>” symobls get turned into html entities, so that A Review of <code><cite></code>Lake Wobegon Days<code><cite></code>, by Garrison Keillor becomes A Review of <code><</code>cite<code>></code>Lake Wobegon Days<code><</code>cite<code>></code> by Garrison Keillor in the HTML source code.
If you use textile, with underscores or question marks, it doesn’t get parsed at all, and your book title comes out with underscores or question marks on either side.
At least one other person have needed to style book titles in their article titles, a few other users have agreed this may be a bug, and it seems to be something that would present problems for many very mainstream uses of Txp.
A fix would be really nice. :)
Offline
#2 2006-01-28 02:26:00
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Code in article titles
How would we handle:
- titles in RSS and Atom feeds
- titles in emails
- titles in lists (e.g. on the content > articles tab)
- the
titleattribute of article permlink tags - the
<title>...</title>tag - links in breadcrumbs
- etc
Also, how do we distinguish between an article title like “big bold text”, and “about the <br /> tag”?
Remember, the solution has to also cope with a title like “a + b > c”
The current solution (titles are text without markup) solves all of these, so I don’t think we can consider this a bug report.
Last edited by zem (2006-01-28 02:52:50)
Alex
Offline
#3 2006-01-28 06:27:31
- Anark
- Member

- Registered: 2004-08-14
- Posts: 101
Re: Code in article titles
> I don’t think we can consider this a bug report.
Would you consider a feature request, then, to Textile-parse (inline elements only) headings?
Offline
#4 2006-01-28 06:34:57
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Code in article titles
Sure, if you can figure out how to solve those problems. (Textile parsing doesn’t solve them all)
Alex
Offline
#5 2006-01-28 08:01:55
- Anark
- Member

- Registered: 2004-08-14
- Posts: 101
Re: Code in article titles
Thinking out loud:
Say you limit Textile to boldfacing, italicising, and prettifying apostrophes and quotes.
Then you decide on a case-by-base basis whether to parse for Textile or whether to strip the underscores and the asterisks. You’d be sure to parse the entry title itself but you’d stip the the underscores and the asterisks for what goes inside the XHTML document’s title tags, for instance.
Offline
Re: Code in article titles
Hi all.
This also has been discussed here:
http://forum.textpattern.com/viewtopic.php?id=11648
http://forum.textpattern.com/viewtopic.php?id=12285
http://forum.textpattern.com/viewtopic.php?pid=84194#p84194
Maybe there are some ideas that can be implemented or added to this discussion.
Offline
#7 2006-01-28 14:03:10
- Anark
- Member

- Registered: 2004-08-14
- Posts: 101
Re: Code in article titles
Offline
#8 2006-01-28 16:58:09
- marknumberm
- Member

- From: Minneapolis
- Registered: 2005-11-29
- Posts: 46
Re: Code in article titles
Anark’s solution sounds to me as though it would work.
Allow just a few Textile modifers; parse them in some cases; strip them off in others.
Offline
Re: Code in article titles
I certainly wouldn’t object to some form of “lite” textile like we used to have with comments. Bold text and italics would definitely be welcome for my part. Anything else would be a bonus. It would be nice to be able to put at least a little bit of expression into post titles. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#10 2006-01-28 17:41:19
- marknumberm
- Member

- From: Minneapolis
- Registered: 2005-11-29
- Posts: 46
Re: Code in article titles
Also, how do we distinguish between an article title like “big bold text”, and “about the
<br />tag”?
One more thought: yes, I know people use txp to write articles about code and therefore have a need to include HTML tags etc. in article titles. But as it stands, I think we’re giving up a lot to gain just a little.
To wit, it’s now very easy to title an article “about the <h1> tag” but it is impossible to have a title that reads “Themes in Shakespeare’s Macbeth”
There are lots of coders here on the forum, so being able to write an article about <h1> and have the tag appear, without fuss, in the article title might seem pretty important. But think of all the more mainstream users; I expect that to most of them, being able to refer properly to the title of a book would be far more important.
Offline
#11 2006-01-29 00:51:10
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Code in article titles
an article NAME and an article TITLE ? : )
good thing big displays are becoming cheaper!
Offline
#12 2006-01-29 01:02:47
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Code in article titles
If someone sends a patch, we’ll take a look.
To wit, it’s now very easy to title an article “about the
<h1>tag” but it is impossible to have a title that reads “Themes in Shakespeare’s Macbeth”
The failure mode for the current method is a minor cosmetic degradation.
The failure mode for Textile would be broken feeds, broken HTML, and an increased support load.
Alex
Offline
#13 2006-01-29 01:32:44
- marknumberm
- Member

- From: Minneapolis
- Registered: 2005-11-29
- Posts: 46
Re: Code in article titles
The failure mode for the current method is a minor cosmetic degradation.
I’m not trying to waste your time. And I guess if it’s impossible, then it’s impossible, and we’ll all just have to live with it. :)
But I have to say that it’s more than a “minor cosmetic degradation” at issue.
Nearly every organization that issues guidelines on language (MLA, APA, AGPS, MHRA, etc. — see a list here ) requires that books, magazines, newspapers, plays, legal decisions, etc., be italicized or underlined.
Not being able to follow those rules in a txp article title greatly limits the uses to which one could put txp. That seems pretty important to me.
Last edited by marknumberm (2006-01-29 01:34:27)
Offline
#14 2006-01-29 01:40:08
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Code in article titles
And I guess if it’s impossible, then it’s impossible, and we’ll all just have to live with it. :)
I’m not saying it’s impossible. I’m saying we need a solution that doesn’t break stuff.
Nearly every organization that issues guidelines on language (MLA, APA, AGPS, MHRA, etc.—see a list here ) requires that books, magazines, newspapers, plays, legal decisions, etc., be italicized or underlined.
In citations and bibliographies, sure. You can already do that with Textpattern. But in headlines?
Alex
Offline
#15 2006-01-29 02:36:23
- marknumberm
- Member

- From: Minneapolis
- Registered: 2005-11-29
- Posts: 46
Re: Code in article titles
…But in headlines?
Yes, any time you use the title of a book, magazine, etc.
If someone were writing a paper about a book, the title (or heading) of the paper would have the title of the book in italics. (Two Cities in Dickens’ A Tale of Two Cities)
And it would look very odd if it were left in non-italics along with the rest of the title, don’t you think?
Offline