Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Default section title in 4.07 not displaying
I’m having trouble getting <txp:section title="1" wraptag="h1" />
to display the home page title. I have a a section “home” that is the selected as the shown on the front page, with every other section not shown on the front page.
http://webtemp2.paulbunyan.net/
The title for the sections show on every section but the home section. This worked in 4.06, how come this is broken in 4.07? thanks!
-Nate
Offline
Re: Default section title in 4.07 not displaying
Multiple section can be selected to show on the front page (this didn’t change in 4.0.6), so you’ll have to use something like this instead:
<h1><txp:if_section><txp:section title="1" /><txp:else />Home</txp:if_section></h1>
Offline
Re: Default section title in 4.07 not displaying
With that it displays only “Home” for the section title on each section, and Default still comes up blank. Looking at the source, textpattern renders the title for Default as <h1> </h1>
. So it’s grabbing my styles for H1, but not the title…..arg.
Offline
Re: Default section title in 4.07 not displaying
Try this one:
<h1><txp:if_section name="">Home<txp:else /><txp:section title="1" /></txp:if_section></h1>
Offline
Re: Default section title in 4.07 not displaying
sweet that seemed to work.
So in 4.07 you can’t use a sections title, like “Home”, that is marked as being on the front page apparently. How come that changed? There are a few other quarky things that changed in 4.07 from 4.06 that i have gripes about…
Offline
#6 2008-12-19 17:42:22
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Default section title in 4.07 not displaying
Hmm… the difference I notice is that on the front page <txp:section title="1" />
displays default
in 4.0.6, and in 4.0.7 it displays nothing. What I don’t understand is how it could have displayed Home
on your site, because you can’t assign a section title to the default section (because it’s not a real section)…
Offline
Re: Default section title in 4.07 not displaying
oh ya, i forgot I had to do a if else for the title on the default pages…your right. but it at least displayed “something” in 4.06,now it just displays blank in the default section.
Offline
#8 2008-12-19 21:47:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Default section title in 4.07 not displaying
ecklesroad wrote:
now it just displays blank in the default section.
Which seems an improvement to me, why would anyone want to display ‘default’? ;)
Offline
Re: Default section title in 4.07 not displaying
I would assume someone would want to use the section title from the section that is marked to be on the front page. Guess it doesn’t work that way.
Offline
Re: Default section title in 4.07 not displaying
ecklesroad wrote:
I would assume someone would want to use the section title from the section that is marked to be on the front page. Guess it doesn’t work that way.
Multiple sections can be marked to appear on the front page
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Default section title in 4.07 not displaying
Thanks guys for your help!
Offline
Re: Default section title in 4.07 not displaying
Huh? So this doesn’t work:
<h1><txp:if_section><txp:section title="1" /><txp:else />Home</txp:if_section></h1>
And this DOES work?
<h1><txp:if_section name="">Home<txp:else /><txp:section title="1" /></txp:if_section></h1>
Both should give exactly the same result, because the name attribute defaults to an empty string if not explicitly specified.
Offline