Help - Search - Members - Calendar
Full Version: Headline and subhead in MTEntryTitle
Movable Type Community Forum > Additional Resources > Tips and Tricks
kevin
I want to enter this in an entry's Title field
QUOTE
Headline / Subhead
and end up with this HTML on my web page
CODE
<h1>Headline</h1>
<h2>Subhead</h2>

How do I do this? The SplitLoop plugin almost does it. KeyEntries and some rubrics would work on multi-line fields like MTEntryBody. But those don't quite do what I want. Any ideas?
kevin
Well, a little more thought (not all that much more, I must confess) helped me see that this can be done using the SplitLoop plugin.

CODE
<h1><MTSplitLoop value="[MTEntryTitle]" glue=" / "><MTSplitLoopValue></h1>
<h2></MTSplitLoop></h2>
kevin
Still searching for a true solution, actually. My first "solution" yields correct-looking results but on further inspection I see it generates invalid HTML (unless there's no subhead).

The reason for this is that with MTSplitLoop you can't quite go from "A;B;C" to "A","B","C". From what I can tell, you can only get "A","B","C",. Note the final comma, which is a significant difference.

Any ideas on how to reach my "head / subhead" goal, anybody?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.