Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2007-12-28 09:53:32
- haelen
- Member
- Registered: 2007-11-13
- Posts: 14
Re: "Static" Home Page displaying, but not other content.
Thanks Jonathan.
Yes, it does look really easy!
I’ve followed the step-by-step instructions and no content is shown on my “home” page.
I’m happy to give you admin privileges so that you can check whether I have made a simple (or other) mistake.
Cheers,
Tim
Offline
Re: "Static" Home Page displaying, but not other content.
You can email me via this forum. But – you can specify the page code and the accompanying form and I can help you from here.
BTW – have you checked in the sections tab to see if the section is question is set to “On front page?”. If you are using the default page/form, that should be turned on.
Offline
#18 2007-12-28 11:04:03
- haelen
- Member
- Registered: 2007-11-13
- Posts: 14
Re: "Static" Home Page displaying, but not other content.
Thanks Jonathan:
Offline
Re: "Static" Home Page displaying, but not other content.
You mean this part?
<!-- center -->
<div id="content">
<txp:article limit=1 form="static" status="sticky" />
That outputs 1 sticky article, which are handled differently from normal articles. Sticky articles are used for static articles outside the normal flow. For example:
<---Section page, show the sticky article, then the 5 latest in this section --->
<txp:article limit=1 form="static" status="sticky" />
<txp:article limit=5 form="static" />
Offline
#20 2007-12-28 11:46:40
- haelen
- Member
- Registered: 2007-11-13
- Posts: 14
Re: "Static" Home Page displaying, but not other content.
That’s what I meant.
If the only “Sticky” article I have is the one I want to have as my static “home” page, then isn’t having:
<txp:article limit=1 form="static" status="sticky" />
all that’s required in the “static” page template ?
Offline
Re: "Static" Home Page displaying, but not other content.
Actually you don’t even need to make it a sticky article. Stickies work like in my article above – they stand out from the normal article flow, allowing you to have a static article always show up above other articles. Think of it as useful for pages where you want a consistent message displayed, like on a landing page, followed by a series of articles.
Back to your question – what is the name of your section? And what are your settings for the section? Look under “sections” tab for this.
Offline
#22 2007-12-28 15:58:15
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: "Static" Home Page displaying, but not other content.
You can also use
<txp:article_custom id="123" />
for your frontpage.
Offline
#23 2007-12-28 17:34:44
- haelen
- Member
- Registered: 2007-11-13
- Posts: 14
Re: "Static" Home Page displaying, but not other content.
section name: “about”
title: “About”
uses pages: “static”
uses style: “default”
selected by default: “No”
on front page: “Yes”
syndicate: “No”
include in site search: “Yes”
Offline
Re: "Static" Home Page displaying, but not other content.
I would changes “on front page” to “no”, then (assuming you only have one article assigned to the “about” section) change the article type from sticky to live. With that:
<!-- center -->
<div id="content">
<txp:article limit=1 />
That’s all you need.
Offline
#25 2007-12-28 19:26:23
- haelen
- Member
- Registered: 2007-11-13
- Posts: 14
Re: "Static" Home Page displaying, but not other content.
Unfortunately that doesn’t work.
I can’t seem to contact you via e-mail either. When I click on your name for your profile I get a message which says I don’t have permission to view.
You can contact me at timothyrowe at gmail dot com & I can give you a login id for my site.
Offline
Offline
#27 2007-12-31 03:53:40
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
Re: "Static" Home Page displaying, but not other content.
We’ve got our home page set up as “regular” index.php outside of Textpattern. PHP includes the DataConnect, then:
// Delve into the textpattern database to get news stories for the home page
$recentNewsCat = '01. Recent News';
$archivedNewsCat = '02. News Archives';
$dc = new DataConnect();
$dc->connect();
$sql = "SELECT * FROM textpattern WHERE (Category1 ='$recentNewsCat' OR Category2 = '$recentNewsCat')" .
" AND Status = 4 ORDER BY LastMod DESC LIMIT 4";
$news_rs = $dc->execute($sql);
.. And in the page where the News articles are displayed:
<?php
// Show the news stories if there are any
echo('<div id="newslist">');
echo('<h3>News</h3>');
echo('<ul>');
while($row = mysql_fetch_array($news_rs)) {
echo('<li><strong>'.$row['Title'].'</strong><br /><span class="lastupdated">Posted '.date("F j, Y",strtotime($row['LastMod'])).'</span><br />');
echo($row['Excerpt'].' ');
//echo('<br /><div align="right">[ <a href="txp/?s=News&id='.$row['ID'].'">Continue "'.$row['Title'].'"...</a> ]</div></li>');
echo('<br /><div align="right">[ <a href="txp/?s=News&id='.$row['ID'].'">Read More...</a> ]</div></li>');
}
echo('</ul>');
echo('<p><a href="txp/?s=News&c='.$archivedNewsCat.'">View More News Stories</a></p>');
echo('</div>');
//}
You may have your TXP url’s set up to be ‘cleaner’ than ours. — Good luck! Vicki
Offline
Re: "Static" Home Page displaying, but not other content.
With the glx_if plugin you could have something like this in your default template.
<txp:glx_if_frontpage>
<p>Your static content here<br />
and/or you could call an article id like the suggestion above<br />
<txp:article_custom id="123" /><br />
Or you can have more complex content by including it in a form called frontpage like:
<txp:output_form form="frontpage" /></p>
<txp:else />
<txp:article />
</txp:glx_if_frontpage>
>Edited to add more options
Last edited by colak (2007-12-31 09:06:26)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline