Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-10 04:08:38

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Ah! I'm finally getting it! But...

Well I’ve finally figured out how to post static content onto my site! After a week of work, finally I’m understanding the basics! Thanks to all who have helped me this far!

One thing that I am consufed on is what is the purpose of the “default” section and page? I don’t understand why it is even there?

Let me explain what I’m trying to do and then you all can tell me how I’m messing it up. lol. :o)

I have 5 different pages set up in txp. I also have 5 different sections set up in txp with each section set up pointing to the corresponding “uses page”. Those are:

1. Home
2. About
3. Portfolio
4. Services
5. Contact

What I want is when someone goes to deronsizemore.com, it will take them to the “home” page/section. For whatever reason, currently if you go to my address, it brings up the “portfolio” page. But if you go ahead and click on the link “Home” at the top, it takes you to the right place. I have no idea why when you type in deronsizemore.com it takes you to the portfolio page.

also where does the default section and page come into all of this?

Last edited by deronsizemore (2005-11-10 04:09:27)

Offline

#2 2005-11-10 04:46:52

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: Ah! I'm finally getting it! But...

Hey Deronsizemore,

The default section, page, style and form are for when nothing is specified, so that even if you don’t customise anything you can still write some articles and see the results on your homepage. The default section (admin > presentation > sections) is what will be displayed when someone goes to your homepage, so I guess at the moment it says “uses page: portfolio”. You want to change that to “home”. Note that you have to use the save button in the relevant section – if you change options on several sections, only the changes in the section whose save button you use are actually saved (it’s caught me out a few times). Finally the default form is what is used if you just have a <txp:article /> or <txp:article_custom /> tag, with no form="" attribute.

HTH

peace – boblet

Offline

#3 2005-11-10 05:18:41

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Ah! I'm finally getting it! But...

So basically I can just leave “default” blank then and it will be fine?

Okay, so this is what I’ve done (over and over again actually)…I went to “sections” and where it has default I set it’s “uses page” to “home”, and clicked save. Still if you go to my homepage it shows up the portfoliio section. Could this be some glitch?

I took screenshots of what I have to hopefully make it more clear. I’m still new with this and sometimes I confuse myself with what I write, so I can only guess how you all trying to help me feel. :o)

Sections: http://home.ripway.com/2005-9/450559/sections.gif

Pages: http://home.ripway.com/2005-9/450559/pages.gif

One thing I just thought of that might be messing it up is this. I accidently deleted the code for “default” found under the “forms” tab. I deleted it and then saved it, so now there is nothing there under “default” in “forms”. If you know, can you tell me what should be back in there for default – article under “forms”?

Thanks

Offline

#4 2005-11-10 06:12:06

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: Ah! I'm finally getting it! But...

> deronsizemore wrote:

> So basically I can just leave “default” blank then and it will be fine?

I’m not quite sure what default you’re referring to (out of the four – actually 5 now as there’s an error-default in 4.02 ;-) If you’re referring to the deleted default form I’m not sure, but this shouldn’t affect the home page issue. Still best to use the original code or modify it so something is there.

> Okay, so this is what I’ve done (over and over again actually)…I went to “sections” and where it has default I set it’s “uses page” to “home”, and clicked save. Still if you go to my homepage it shows up the portfoliio section. Could this be some glitch?

that’s what I would have done. I wonder if for some reason specifying a home section breaks it? Try deleting your home section (not page!) and seeing if it works.

> I took screenshots of what I have to hopefully make it more clear

great idea! highly appreciated ;-)

> One thing I just thought of that might be messing it up is this. I accidently deleted the code for “default” found under the “forms” tab

this is used for formatting article lists and individual articles.

> If you know, can you tell me what should be back in there for default – article under “forms”?

TextBook Appendix E: Default forms, pages and styles

peace – boblet

Offline

#5 2005-11-10 06:19:18

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Ah! I'm finally getting it! But...

If your most recent article is posted to the “home” section, and the “home” section is set to show on front page, Textpattern will do that. To hide postings to specific sections from the front page, set show on front page to no in your sections settings.

Offline

#6 2005-11-10 07:38:19

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Ah! I'm finally getting it! But...

<b>>boblet wrote:

>I’m not quite sure what default you’re referring to</b>

I was referring to the one when you go to presentation>pages
<br />

<b>>boblet wrote:

>Try deleting your home section (not page!) and seeing if it works.</b>

Nope, that didn’t work. Since you post articles to a section, I need it there. Since it will not let you post articles to the “default” section either.
<br />
I honestly don’t see why this is so hard for me. I’ve more or less got the process down pat of how to post static content to different pages of a site (ex: about, services, contact)

I just for the life of me cannot figure out what to do to post static content on the home page of my site which is what people will see when they go to deronsizemore.com. From the posts I’ve looked through tonight in the forum and the last few in this thread I understand that my default section is for my homepage, but how do you post content to it when you go to post in the article section and txp does not let you select default from the dropdown box of sections?

Do you have a link to a tutorial that shows how to post content to the homepage (default)? All of the tutorials I have read tell you have to make an additional static page like an about page, but none tell you how to just post something on your homepage.

<br />
<b>>rsilletti

>If your most recent article is posted to the “home” section, and the “home” section is set to show on front page, Textpattern will do that. To hide postings to specific sections from the front page, set show on front page to no in your sections settings.</b>

Thanks! That doesn’t fix my initial problem at hand, but I see what you mean as i’m sure it would have been a problem later.

Offline

#7 2005-11-10 09:05:57

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Ah! I'm finally getting it! But...

<blockquote>I have 5 different pages set up in txp. I also have 5 different sections set up in txp with each section set up pointing to the corresponding “uses page”. Those are:

1. Home
2. About
3. Portfolio
4. Services
5. Contact

What I want is when someone goes to deronsizemore.com, it will take them to the “home” page/section. For whatever reason, currently if you go to my address, it brings up the “portfolio” page. But if you go ahead and click on the link “Home” at the top, it takes you to the right place. I have no idea why when you type in deronsizemore.com it takes you to the portfolio page.
</blockquote>

Please, to be clear, go to Sections tab, then answer these 3 questions :

  1. What is the “Uses page:” you set for Default ?
  2. What is the “Uses page:” you set for Home ?
  3. What is the “Uses page:” you set for Portfolio ?

Last edited by Niconemo (2005-11-10 09:07:30)


Nico

Offline

#8 2005-11-10 15:42:20

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Ah! I'm finally getting it! But...

<blockquote>
Please, to be clear, go to Sections tab, then answer these 3 questions :

  1. What is the “Uses page:” you set for Default ?
  2. What is the “Uses page:” you set for Home ?
  3. What is the “Uses page:” you set for Portfolio ?</blockquote>
    <br />
    Hi,
    Okay first of all I deleted the Home section and did what rsilletti said about clicking no for “publish on front page”. I think the portfolio section was the last one that I did so it was posting it to the front page. Once changed that all was fine.

Currently my sections are:

1. Default with uses page set to “Default”
2. About with uses page set to “About”
3. Portfolio with uses page set to “Portfolio”
4. Services with uses page set to “Services”
5. Contact with uses page set to “Contact”

Right now if you look at the site, everything is as it should be. All of my extra pages work (IE: About, Portfolio, Services, Contact) But no matter what I try, I cannot get any articles to post to my homepage. This is my homepage address: http://www.deronsizemore.com/default but when I go into Content>Write and then click the dropdown box for what section to post the article to, it will not let me select Default so I can post it on the homepage. Hopefully this makes sense.

Thanks

Offline

#9 2005-11-10 15:56:52

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Ah! I'm finally getting it! But...

Deron,
What kind of article tag are you using in your pages?
Can you show us that part of the code?

If it is a ton of code, please post it in pastebin

Cheers,

Matthew


Offline

#10 2005-11-10 16:20:49

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: Ah! I'm finally getting it! But...

Hey Deron,

sorry this is being more drawn out that it should be. The default section is like a collecting house of all the other sections that have “On front page?” set to yes in presentation > sections (at least your About section from the screen capt). Normally for weblogs the front page is a list of excerpts from all recent articles, and clicking on an article takes you to the article in it’s relevant section.

It seems the way I got around the requirement for the “default” section to be the site’s homepage and yet not be directly assignable for content was to create another section that’s only to put static homepage content in (embarassingly enough your home section would have worked well for this). I then displayed them by using a form in the default page template (<txp:output_form name="home-content" />), with the form containing <txp:article_custom section="home" />. This will display all the articles from that section Another way would be to save the text you want on the homepage into a form, and call the form as above from the default page template. This has some disadvantages, like no automatic Textiling, a little harder to edit, no separation of code and content etc. However there’s no extra section and it’s probably enough if you’re not planning to change your homepage static text very often.

Finally (and best?) you could make the static text you want on the homepage into an article in any other section, and give it a “hidden” status (section 5.1). anything but live really. Then you can display it on the homepage using a form that contains <txp:article_custom section="where-you-saved-it" status="hidden" /> (more on article_custom). This keeps the text as an article, stops you having to make a new section for it, and prevents it showing up in the section you saved it in.

Using default section your website url is just http://www.deronsizemore.com/ (there’s no additional “default” on the end; default = your site’s home page). You can also see this in the if_section tag – to select the default section, you have to use the attribute name="". This also means you should change the home link to <txp:link_to_home><txp:sitename /></txp:link_to_home> or something similar.

Hope that all makes sense – sorry, I haven’t been most lucid this evening!

peace – boblet

Last edited by boblet (2005-11-10 16:28:24)

Offline

#11 2005-11-11 05:44:32

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Ah! I'm finally getting it! But...

<blockquote>It seems the way I got around the requirement for the “default” section to be the site’s homepage and yet not be directly assignable for content was to create another section that’s only to put static homepage content in (embarassingly enough your home section would have worked well for this). I then displayed them by using a form in the default page template (<txp:output_form name="home-content" />), with the form containing <txp:article_custom section="home" />. This will display all the articles from that section Another way would be to save the text you want on the homepage into a form, and call the form as above from the default page template. This has some disadvantages, like no automatic Textiling, a little harder to edit, no separation of code and content etc. However there’s no extra section and it’s probably enough if you’re not planning to change your homepage static text very often.</blockquote>

I’m sorry, but you completely lost me after telling me my home section would have worked. I am not familiar enough with txp’s code I guess. The code you gave me, are you telling me exactly what I need to use or just kind of an example of what I could do? Like I said I’m not experienced enough with txp yet to know where to replace your code with my own code. I’m not real familar with creating forms either.

<blockquote>Finally (and best?) you could make the static text you want on the homepage into an article in any other section, and give it a “hidden” status (section 5.1). anything but live really. Then you can display it on the homepage using a form that contains <txp:article_custom section="where-you-saved-it" status="hidden" /> (more on article_custom). This keeps the text as an article, stops you having to make a new section for it, and prevents it showing up in the section you saved it in.</blockquote>

I actually got this to work, but didn’t post the content like static content. It posted it like a blog, where it gave the post title and told when it was posted, etc…

<blockquote>Using default section your website url is just http://www.deronsizemore.com/ (there’s no additional “default” on the end; default = your site’s home page). You can also see this in the if_section tag – to select the default section, you have to use the attribute name="". This also means you should change the home link to <txp:link_to_home><txp:sitename /></txp:link_to_home> or something similar.
</blockquote>

Um…lost again here. I honestly have no idea what you’re trying to explain to me in this last section.
I’m sorry I’m being so difficult with this. I just have a hard time believing that txp is really as hard as I seem to be making it. I mean I feel like a complete moron, because I don’t understand anything.

I tried this and it seemed to work. Maybe someone can tell me downfalls with this or how it might pose future problems.

First I created a new section called “home”. Second created a page called “home” with my template and this code where I want my content to go:
<div id="leftcontent">
<txp:article limit=1 form="static_article" status="sticky" />
</div> .

In sections I pointed “default” to use page: home. I also pointed section “home” to use page: home and set option “on front page” to YES. Therefore every article published on the home section will show up on the homepage since default section is pointed to “home” and I’ve set every article to YES to show up on the front page. Does that make sense?

Offline

#12 2005-11-11 05:48:13

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Ah! I'm finally getting it! But...

<blockquote> Deron,
What kind of article tag are you using in your pages?
Can you show us that part of the code?

If it is a ton of code, please post it in pastebin

Cheers,

Matthew
</blockquote>

Matthew,
Here is the code I’m using right now in my default page as well as all my other pages:

<txp:article limit=1 form="static_article" status="sticky" />

Hope that is what you asked for?

Offline

Board footer

Powered by FluxBB