Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-19 14:34:10

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

#2 2008-12-19 15:04:22

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#3 2008-12-19 15:25:10

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

#4 2008-12-19 15:38:47

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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>

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2008-12-19 15:56:13

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

#7 2008-12-19 18:06:47

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

#9 2008-12-19 23:21:18

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

#10 2008-12-19 23:45:10

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#11 2008-12-20 01:15:39

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

Re: Default section title in 4.07 not displaying

Thanks guys for your help!

Offline

#12 2008-12-20 07:24:34

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

Board footer

Powered by FluxBB