Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-22 03:00:06

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 167
Website

Have text appear only on front page

I would like to have some text in the sidebar appear only on the front page — not in any of the other sections or categories, not in any of the individual articles. As an example of where I’m headed, I tried using <txp:if_article_list> on the default page so that the text does not show in any of the other sections or in individual articles, but it’s still there in the other categories.

Thanks for any help.


Mark

Offline

#2 2009-06-22 04:36:08

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Have text appear only on front page

Try:

<txp:if_section name="">

Offline

#3 2009-06-22 05:10:30

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 167
Website

Re: Have text appear only on front page

I get the same result as above. The text still shows up in the various categories.

I’m wondering if what I’m requesting even makes sense. After all, a category is simply a subset of articles that appear (or have appeared at one time or another) on the front. Still, it would great if I could pull it off since it would make an advertiser happy. ;)


Mark

Offline

#4 2009-06-22 05:55:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Have text appear only on front page

Hi MarK,

You can use the glx_if plugin.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#5 2009-06-22 06:07:30

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Have text appear only on front page

Have you tried <txp:if_section name="default">?

Offline

#6 2009-06-22 06:14:33

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Have text appear only on front page

jstubbs wrote:

Have you tried <txp:if_section name="default">?

I guess that the main difference between <txp:if_section name="default"> or <txp:if_section name=""> and <txp:glx_if_frontpage> is that the first also considers urls like site.tld/?pg=2 as residents of the default section whereas the plugin makes a clear separation of the front page from the rest.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#7 2009-06-22 16:43:35

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 167
Website

Re: Have text appear only on front page

Thanks. <txp:if_section name=“default”> and <txp:if_section name=”“> still show the text in categories. <txp:glx_if_frontpage> worked just the way I hoped.


Mark

Offline

#8 2009-06-22 17:51:31

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Have text appear only on front page

mwr wrote:

Thanks. <txp:if_section name=“default”> and <txp:if_section name=”“> still show the text in categories.

Yep. if_section is section conditional, and you want to match categories. More likely it would be with core tags:

<txp:if_section>
	<!--
		We are on the default page.
	-->
	<txp:if_category>
		<!--
			Viewing categories on default
			page.
		-->
	<txp:else />
		<!--
			Not viewing categories on default
			page.
		-->
	</txp:if_category>
</txp:if_section>

Last edited by Gocom (2009-06-22 17:51:47)

Offline

Board footer

Powered by FluxBB