Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-09-12 06:15:46

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [request] wrapping and formatting titles

Think simple. We could make <txp:title maxword=32 /> insert a shy or zws at the 32nd character of any words longer than 32 letters. No syllables, no UI. If maxword is not specified, nothing happens. The browser (and css and xhtml) does the rest, Textpattern just provides a hint.


Alex

Offline

#14 2006-09-12 12:02:41

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: [request] wrapping and formatting titles

zem, your concise style forces interpretation, which leads to misinterpretation, which one tries to avoid by covering every possible direction. thus you need to read much more.

Think simple. [ … ] No syllables, no UI.

:)

this is the plugin request forum here ;)

but above all designing matters it’s my concern to have it customizable but stable, i.e. if i have to make word separations customizeable via custom fields, thus involving a txp:php-function , i fear the potential danger of conflicting with other txp:php snippets i need similarly. so, if you implement any solution that reduces the need for engaging a plugin or a txp:php function, i’d prefer that.

BTW you’ll need at least two parameters/custom fields to be able to insert a separator into words longer than n characters: the wordlegth position is not of necessity the ideal or correct position for a separation. so you’d have one value for maxlength and another one for the separation position(s).

but doing this numerically seems like operating knife and fork by chopsticks. it is far more intuitive to provide this information text based in a custom field.

it’s the separation index character that should be fixed in a <code><txp:title sepchar=“value”></code>.
why a character? authors shouldn’t undergo the procedure of typing half a sentence with cryptic and unusual character combinations like <code>&#8203</code>. this promotes typos and supports unsafeness and thus unwillingness. using normal characters is far easier and faster. if a slash is part of the title text, it can’t serve as the separating index. so it’s maybe two slashes or a bullet, that gives the index. this is dependent on author’s style and site content.
this approach of providing several possible breaking points also allows of narrow columns (newspaper-like designs or large font sizes), where the need for several word separations appears often.

maybe you can provide a method of filtering out (from the title itself) custom, unusual, characters used for setting separation indexes: there wouldn’t be even one single custom field occupied by title separation matters.

Last edited by uli (2006-09-12 13:02:33)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#15 2006-09-21 06:30:57

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: [request] wrapping and formatting titles

zem wrote:

FYI, the Textpattern 4.0.4 pre-release already has built-in support for the widont idea, via the <txp:title no_widow=1 /> attribute.

For the sake of consistency, this had to be added to txp:recent_articles, too.

Offline

Board footer

Powered by FluxBB