Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-16 08:07:03

haelen
Member
Registered: 2007-11-13
Posts: 14

"Static" Home Page displaying, but not other content.

This is something that’s probably quite simple to implement, but I’ve somehow missed it.

I have tried assigning a section (the “about”) which uses “default” page and have used the tick box “front page”. This now appear as the home page.

However other content (i.e. blog entires accessed via a link on the home page) do not appear when the link is followed – just a blank page.

The blog articles are set to not show up on the front page.

TIA,
Tim

Offline

#2 2007-11-16 15:39:12

JonahC
Member
From: Toronto
Registered: 2007-09-23
Posts: 39
Website

Re: "Static" Home Page displaying, but not other content.

Hi

I’ll take a stab at this. I’m assuming you are using “default” page template to show the articles (blog postings)? What do you have in the default page? Do you actually have a tag that tells txp to show your blog postings? Something like

<div id="content">
           <txp:if_individual_article>
                 <txp:article />
         <txp:else />
                 <txp:article status="sticky" />      
         </txp:if_individual_article>
</div> <!-- closes the content -->

It also sounds like your “default” template contains the static blurb for “about”. The Textpattern Solutions recommends that you create a posting and set that posting as sticky. The default page template should only contain txp tag instructions on what to show. The actual content should be in articles from the write tab. When you then go to /about/ section you will then see your sticky article (that’s how I’ve set up mine as shown in the code above).

I’m sure someone will correct me if I’m wrong.


Jonah Calinawan
www.foodportraits.com

Offline

#3 2007-11-16 16:21:40

haelen
Member
Registered: 2007-11-13
Posts: 14

Re: "Static" Home Page displaying, but not other content.

Hi Jonah,

Thanks for the prompt response.

Firstly, I don’t know if I expressed my problem clearly enough.

I need to create and “index” page, or “home” page which is static (or I guess, “sticky) which people will see every time the visit my site. (At least, when they visit the “root” folder as it were.)

Being totally new to textpattern, I’m trying to find the best way (or “standard” way) of implementing this.

The Blog pages are a separate issue, which I will try and deal with using the code you posted.

Best Wishes,
Tim

Offline

#4 2007-11-16 17:39:35

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

Re: "Static" Home Page displaying, but not other content.

Another way is use <txp:output_form />- and <txp:if_section />-tags. Like in example:

<txp:if_section name="">
	<txp:output_form form="frontpage" />
</txp:if_section>
<txp:if_section name="blog">
	<txp:article limit="5" />
</txp:if_section>

And then you could put content of those sections inside those forms.

In example, inside form frontpage, (that will be shown at home-page):

<h2>Welcome to my website!</h2>
<p>Hi, isn't this great?</p>

Cheers!

Last edited by Gocom (2007-11-16 17:40:08)

Offline

#5 2007-11-17 06:07:44

haelen
Member
Registered: 2007-11-13
Posts: 14

Re: "Static" Home Page displaying, but not other content.

Hi Jukka,

Thanks for this.

Your solution is “getting there” :) I understand that the problem is mine because of not having had any previous experience of textpattern.

If you go here wwwtheroadtonowhere.co.uk/ you will see that what you proposed doing does work exactly as it should, but I wanted to have the textual content show up to the left of the menus.

Also if I select “Keith’s Corner” (which is where the Blog articles reside) no content appears – even though I have selected “yes” for “on front page” in “sections”.

As you can see, the Blog doesn’t come from a section entitled “blog”.

Best,
Tim

Last edited by haelen (2007-11-17 06:08:45)

Offline

#6 2007-12-05 08:31:31

haelen
Member
Registered: 2007-11-13
Posts: 14

Re: "Static" Home Page displaying, but not other content.

I’m not having a lot of luck with this. I simply want a static index page. I’ve just received the Textpattern Solutions book and can see that there’s quite a learning curve involved – despite that fact that I’m familiar with HTML, CSS and some basic PHP.

I’m really looking for a simple solution to this – at least pro tem until I’m more familiar with TP.

Best,
Tim

Offline

#7 2007-12-05 13:17:04

JonahC
Member
From: Toronto
Registered: 2007-09-23
Posts: 39
Website

Re: "Static" Home Page displaying, but not other content.

Hi-

I thought gocom’s suggestion already fixed this for you?

Had a quick look at your html and you have these tags showing up in your code – that shouldn’t be there

</txp:if_article_list>

</txp:if_section> ——> this appears twice

Maybe you should clear this up first? Also maybe you should check your closing </div> – you might have one missing (or too many?) as your menu bar is showing up in the bottom…

Edit: just looked at it again and you have two extra </divs>; the opening divs are not in the code.

Regards,

Last edited by JonahC (2007-12-05 13:20:45)


Jonah Calinawan
www.foodportraits.com

Offline

#8 2007-12-05 13:32:51

haelen
Member
Registered: 2007-11-13
Posts: 14

Re: "Static" Home Page displaying, but not other content.

Hi Jonah,

I appreciate your taking time to check my code. I’ve been having “finger trouble” today. I’m going to install a new theme and start from scratch – more carefully this time.

Best,
Tim

Offline

#9 2007-12-27 02:58:43

SebastianS
Member
From: Australia
Registered: 2007-10-05
Posts: 46

Re: "Static" Home Page displaying, but not other content.

Hi,
I’m stuck.
I think this relates to what haelen was asking about.
I am new to Textpattern. My site webdevelopmentnotes.com is in it’s infancy.
What I am trying to do is to have a static home page with SEO friendly front page Content, a “Home” and “article” link, and a popup for Categories.

The problem is that the Category “links” always defaults to the front page which is not what I want. I want it to obviously go to the articles related to the Categories, which I have set in the Articles “tab” of the content area.
Much appreciated if anyone can head me in the right direction,

Thamk You

Offline

#10 2007-12-27 08:08:23

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

Re: "Static" Home Page displaying, but not other content.

Not sure which page you need, but TextBook is your friend. Try this or this

You will notice that category_list has a “section” attribute.

Offline

#11 2007-12-27 09:43:24

SebastianS
Member
From: Australia
Registered: 2007-10-05
Posts: 46

Re: "Static" Home Page displaying, but not other content.

Thank you for that Jonathan , I appreciate it,
Using <txp:category_list section=“articles” /> in the “default page” the categories do what they are meant to do, go to CSS or Texpattern articles.
Using <txp:popup type=“c” label=“Browse” wraptag=“p” section=“articles” /> as a tag I get strange behaviour. Having clicked on “CSS” in the “category list” when I go to the popup and click on CSS it goes to the correct CSS article,
but if I then click on Texpattern in the popup, it defaults to home page.
It also works the other way around if I click on Textpattern in the “category list” in the popup clicking on Textpattern it goes to the right articles but in this case CSS popup reverts to home page. webdevelopmentnotes.com
So I am perhaps not coding the <txp:popup type=“c” label=“Browse” wraptag=“p” section=“articles” /> tag correctly.
I will explore further,
Thank you again

Got it to work I had a different code in the, article page to default page using the popup tag,
fixed it by using a menu form, with correct code.

Last edited by SebastianS (2007-12-27 10:00:33)

Offline

#12 2007-12-27 14:57:52

haelen
Member
Registered: 2007-11-13
Posts: 14

Re: "Static" Home Page displaying, but not other content.

SebastianS wrote:

“I think this relates to what haelen was asking about.
I am new to Textpattern. My site webdevelopmentnotes.com is in it’s infancy.
What I am trying to do is to have a static home page”

That’s what I’m after. How did you achieve that? The rest of my site is doing what I want it to – for now :)

Best,
Tim

Last edited by haelen (2007-12-27 14:59:37)

Offline

Board footer

Powered by FluxBB