Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-06 07:00:48

mach3
Member
Registered: 2005-11-26
Posts: 11

One section handling multiple static/sticky pages

Hi – not sure if I’m using the right terminology, but I want to make a couple of sections (none displayed on the first page), each section will contain several static/sticky articles.

I have created static pages before (contact and about) but this is a bit different.

It’s actually a services category. So I created a new section Services: first question, should I use my default page or the static page template?

Now, the Services section will have a few static articles in it – i.e. Services (section) contains ONE (assigned section type Services) TWO THREE and so on.

Do I mark the pages Live or Sticky? I’ve tried both. My main question is – how do i access the pages then via link?

http://site/Services/ONE — doesn’t seem to be working. I can’t “find” the pages ONE TWO THREE etc…

Please let me know if you need clarification or can recommend another way…

Offline

#2 2005-12-06 12:37:18

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: One section handling multiple static/sticky pages

“Sticky” should work as intendend, also your URLs should impose no problems. Sticky articles share the same URL schema as every other article. It depends on your needs which template you use, mine contains a snippets like this:

<txp:if_article_list>
<txp:if_search>
<txp:else />
<txp:article form="static" status="sticky" sortby="id" sortdir="asc" />
</txp:if_search>
<txp:article form="excerpt" limit="5" />
</txp:if_article_list>

<txp:if_individual_article>
<txp:article />	
</txp:if_individual_article>

Offline

#3 2005-12-06 19:54:58

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

Is there anyway I can do this w/out modifying the templates? Isn’t it just an article, not on the front page?

Offline

#4 2005-12-06 21:16:58

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

Actually, I think I have it working now, but my next question is, how do I determine the URL?

I create a sticky article, in the Services section, not displayed on the front page. How do I link to that article? blah.com/Services/article_name doesn’t seem to do it? Is there some place I can “find” URLs?

I should clarify – playing around I switched to /section/title URLs but my First Post seems to disappear. If I stick w/ section/id/title – how do I determine the “id”?

Last edited by mach3 (2005-12-06 21:21:10)

Offline

#5 2005-12-06 21:21:25

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: One section handling multiple static/sticky pages

Have you tried using the “id”?

And now I have to edit. ;)

If you hover on the article title in the article listing page you can see the id in the status bar at the bottom of your screen. Or the “Recent Articles” list at the side of the article editing textarea.

Last edited by thebombsite (2005-12-06 21:25:15)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2005-12-06 21:41:23

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

Well I’m fantastically confused now. Thanks Stuart – that previous post helped me identify the ID.

So I switched to section/title, and lost my “live articles” when I tried to go to them directly. Stu posted the above, I figured out the IDs, so I switched back to “section/id/title” and I’ve still lost the live articles???

Now I’m wondering if this is even the right way to handle it. Should I have a Services section, w/ different categories and articles? I.E. Services section w/ Administration category and Linux article?

Last edited by mach3 (2005-12-06 21:48:40)

Offline

#7 2005-12-06 22:09:44

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: One section handling multiple static/sticky pages

I think I need to see the code you are using for the page template. Place it between < code>< /code> tags (without the spaces) to display it properly here.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2005-12-06 22:16:02

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

<code>
<txp:output_form form=“DTD_head” />

</head>

<body id=“home” class=“log”>

<!— start default page template —>

<!— header —>

<txp:output_form form=“header” />

<h1><txp:ob1_title order=”%sitename,%section,%category,%article” separator=” – “ /></h1>

<!— end header —>

<!— content —>

<div id=“container”>

<div id=“maincol”><!— The main content column begins —>

<div class=“col”>

<txp:glx_if_category_list>

<h2 class=“categorytitle”><txp:c /> Category</h2>

</txp:glx_if_category_list>

<txp:ob1_if_section section=“default”> <!— default section —>

<txp:article form=“default” limit=“3” listform=“default” />

<txp:output_form form=“postnavigation” />

</txp:ob1_if_section> <!— end default section —>

<txp:ob1_if_section section=“about,contact”>

<txp:article form=“Single” listform=“Single” />

</txp:ob1_if_section>

<txp:ob1_if_section section=“links”>

<txp:output_form form=“links_page” />

</txp:ob1_if_section>

<txp:ob1_if_section section=“archivescat”>

<txp:output_form form=“archivescat_page” />

</txp:ob1_if_section>

<txp:ob1_if_section section=“archivesmonth”>

<txp:output_form form=“archivesmonth_page” />

</txp:ob1_if_section>

<txp:ob1_if_section section=“search”>

<txp:output_form form=“search_page” />

</txp:ob1_if_section>

</div> <!— close col —>

</div> <!— close maincol —>

<txp:output_form form=“sidebar” />

<div class=“clearing”>&nbsp;</div>

</div> <!— close container —>

<txp:output_form form=“footer” />

</body>
</html>

<!— end default page template —>
</code>

Offline

#9 2005-12-06 22:40:48

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

So I fixed it by modifying this:

<code><txp:ob1_if_section section=“default”> <!— default section —></code>
to this
<code><txp:ob1_if_section section=“article,default”> <!— default section —></code>

Now why in the world was this working before, but suddenly stopped?

Offline

#10 2005-12-06 22:56:26

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

I think I have things under control. But regading category browsing, I can browse “url.com/category/news/” and I get the default First-Post. However, I cannot browse categories assigned to my new Services section.

It has something to do w/ this from the default page:
<code>
<txp:glx_if_category_list>

<h2 class=“categorytitle”><txp:c /> Category</h2>

</txp:glx_if_category_list>

</code>

Last edited by mach3 (2005-12-06 23:09:02)

Offline

#11 2005-12-07 09:33:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: One section handling multiple static/sticky pages

What version of TXP are you using mach3?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2005-12-07 17:36:04

mach3
Member
Registered: 2005-11-26
Posts: 11

Re: One section handling multiple static/sticky pages

The latest, I think I have figured out a work around. Thanks Stu.

Offline

Board footer

Powered by FluxBB