Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
Re: Have text appear only on front page
Try:
<txp:if_section name="">
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
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
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
Re: Have text appear only on front page
Have you tried <txp:if_section name="default">
?
Offline
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
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
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
Pages: 1