Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-07 18:20:20

adamtal
Member
Registered: 2006-09-14
Posts: 25

"Only on Frontpage"? (solved)

I’m using txp for a non-blog site, using sections as my inner pages, so menu items link to section names.
i have the title of each page print the name of the site + section title, but this causes the main page to have the title “default + sitename” (the word ‘default’).
i guess this is because the main page (i.e www.sitename.com) is using the default section, and there’s no option for changing the title of that section.

So i’m looking for a way to override stuff just for the frontpage, so that i could have a different\manually-written title there.

Any other ideas about this would also be appreciated.

Thanks,
Adam

Last edited by adamtal (2006-11-08 05:07:09)

Offline

#2 2006-11-07 19:17:56

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: "Only on Frontpage"? (solved)

You might also consider the plug-in glx_if which adds the tag glx_if_frontpage, among others.

Last edited by reid (2006-11-07 19:18:11)


TextPattern user since 04/04/04

Offline

#3 2006-11-07 19:30:51

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: "Only on Frontpage"? (solved)

Have you tried something like:

<txp:if_section name="default">
<title><txp:sitename />: <txp:site_slogan /></title>
<txp:else />
<title><txp:sitename />: <txp:title /></title>

Offline

#4 2006-11-08 04:55:10

adamtal
Member
Registered: 2006-09-14
Posts: 25

Re: "Only on Frontpage"? (solved)

soulship – tried it, also tried with <txp:if_article_section>. didn’t work.

I’ll try the glx plugin now.

Thanks guys

Edit: glx = working. thanks

Last edited by adamtal (2006-11-08 05:09:25)

Offline

#5 2006-12-18 05:29:16

misterk
Member
From: Morris, MN
Registered: 2004-02-24
Posts: 77
Website

Re: "Only on Frontpage"? (solved)

I want a tag that can separate out the very root of a site from all the other pages, does it exist?

Is glx_if_frontpage supposed to only match the very front page (not ?pg=2)? Because I can’t quite get it working right. index.php with no further parameters is matched by if_frontpage, and not matched by if_not_frontpage. But index.php with parameters is matched by both if and if_not.

Offline

#6 2006-12-18 14:52:09

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: "Only on Frontpage"? (solved)

You can select for the front page like this:

<txp:if_section name="">
<txp:if_category>
<txp:else />
this is your front page
</txp:if_category>
</txp:if_section>

If you also need to filter out a specific page, wet_if_page might be what you want.

Offline

#7 2006-12-18 15:59:23

misterk
Member
From: Morris, MN
Registered: 2004-02-24
Posts: 77
Website

Re: "Only on Frontpage"? (solved)

wet_if_page does it, thanks for the link.

Offline

Board footer

Powered by FluxBB