Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#37 2006-07-09 18:48:21
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: Code in article titles
I unthinkingly went ahead and following accessibility/semantic/best practices tried to use <code><acronym></code> in an article title. Following this I found this (and related) threads.
I have a suggestion – if permitting html tags in the article titles presents a problem for Textile parsing – how about enabling it for those of us that don’t use textile but raw html?
That is “if (no_textile) then display-as-proper-html”. Then Textile parsing wouldn’t be a problem.
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
Re: Code in article titles
<blockquote><blockquote>no seriously, an article NAME and article TITLE? like with category & sections?</blockquote>
This is not a bad idea, nardo. But it would be best if it happened by an automatic process.
Instead of having to write two different titles for every article (especially when many won’t need to be different), I would think there could be something like the functionality of the “URL-only title” field: you type in your article title as you want it to be styled with textile (or probably html, for that matter), and as soon as you click on “Publish,” a TITLE2 (or some such) field is automatically populated with that title minus all coding.
RSS, emails, etc., would get the code-less TITLE2; everything else would get the nicely styled one.
Would that work?</blockquote>
I’m coming late in the discussion but I think that this would be a very useful addition too.
My view:
Separation of title into two tags: <code>txp:title</code> and <code>txp:name</code>
where ‘title’ shows in the head (no html) and name shows in the body (html enabled)
possible use (remember I am no programmer) :)
if ‘name’ empty ‘name’=‘title’
or it can be used with the chh_if_data plugin
ie
<code><txp:chh_if_data><txp:name />
<txp:else />
<txp:title />
</txp:chh_if_data></code>
I recently had to publish a text where the title had a number pointing to a footnote. I know I could use a custom field except I want the ‘names’ of the articles to be searchable so that was out of the question. (basically I had to leave the link to the particular footnote out)
Last edited by colak (2006-07-10 06:22:12)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#39 2006-07-14 02:32:36
- NyteOwl
- Member
- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
Re: Code in article titles
This hit me when I tried moving an article into txp that on the original site had the following in the title:
<code><acronym title=“American Telegraph and Telephone”>AT& #38;T</acronym><sup>& #174;</sup></code>
<br />
I have since hacked my taghandlers.php so that “function page_title” uses “return $out;” rather than “return escape_title($out);” and “function title($atts)” uses “ return $thisarticle[‘title’];” instead of “return escape_title($thisarticle[‘title’]);”
So far there seems to be no ill effects. Still can’t use markup in the article titles but at least it displays html entities now.
Last edited by NyteOwl (2006-07-14 02:57:27)
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline