Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-03 09:52:53

azw
Member
Registered: 2007-01-29
Posts: 279

2 issues: browse categories popup error & home pg uses wrong template

1. In my first Txp site, the browse categories popup (the dropdown menu that appears near the search field) sends results to the default page.

For some reason, in my newest site this popup is sending results to my static_page template.

Is there a way to control which page the results go to?

What determines which page template will be used?

2. Also, I thought that the template used by the home page might determine which is used for the popup’s article_list, so I changed the home section using from static_page template to using the default template. The home page is in that section, but the home page still uses the static_page template.

Is this normal behavior? How can I change the template used by a section? Do I have to delete the articles to do this? (Update: nope, that didn’t work.)

Last edited by azw (2008-02-03 09:57:18)

Offline

#2 2008-02-04 02:37:12

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 issues: browse categories popup error & home pg uses wrong template

  1. Yes, that’s where category listings are by default. Use section attribute.
  2. Need more details.

Offline

#3 2008-02-04 05:21:57

azw
Member
Registered: 2007-01-29
Posts: 279

Re: 2 issues: browse categories popup error & home pg uses wrong template

Hi, Mary, thaks for your response. Sorry I wasn’t clear.

1. I wasn’t talking about which items display within the popup’s dropdown menu. I’m asking what determines which page template is used for the resulting action of using the popup.

2. On the presentations > sections tab, for my home section I have set “uses page” to “default” . (The home page was earlier a static_page, but I’ve changed my mind.)

Even though I’ve changed the setting for “uses page”, it still comes up using the static_page page template when I click on the home page link. How do I fix that?

Maybe I need to create a special page template just for the home page? It’s going to show a short introduction and a listing of announcements (articles from an announcements section).

If I need to give you more info, please tell me what would help you.

Last edited by azw (2008-02-04 05:23:28)

Offline

#4 2008-02-04 05:26:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 issues: browse categories popup error & home pg uses wrong template

  1. Re-read what that attribute is for. Unless you tell popup or the other category tags what section to use, it always uses the default section or front page.
  2. Could you post a tag trace of your site’s front page?

Last edited by Mary (2008-02-04 05:26:43)

Offline

#5 2008-02-04 10:20:15

azw
Member
Registered: 2007-01-29
Posts: 279

Re: 2 issues: browse categories popup error & home pg uses wrong template

1. Okay, I’ll play with the attribute to see what it does. To be honest, I’m surprised to hear your description of what it does. That is very different from the way what the Textbook descriptions says (but the Textbook explanation is a little cryptic). You’re the expert, so I’m sure you’re right!

2. I think I figured it out. On the sections tab, right at the top under the “Create” button, there’s a “Default” setting. If I set the option that says “Uses page” to “default”, the home page uses the default page template. If I set that “Default setting’s “Uses page” to “static_page”, the home page uses the static_page, even though it is set below to use “default”.

That seems very unintuitive. I had assumed that new pages would be created using whatever the “Default” “Uses page” was set to. A little more labelling on the form would be helpful.

Last edited by azw (2008-02-04 10:22:54)

Offline

#6 2008-02-04 17:42:23

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: 2 issues: browse categories popup error & home pg uses wrong template

azw wrote:

On the sections tab, right at the top under the “Create” button, there’s a “Default” setting. If I set the option that says “Uses page” to “default”, the home page uses the default page template. If I set that “Default setting’s “Uses page” to “static_page”, the home page uses the static_page, even though it is set below to use “default”.

Section ‘default’ is the home page. So it doesn’t mean that every newly created section will use this page template by default, but that your home page (or front page) will use this template.

Offline

#7 2008-02-04 19:40:27

azw
Member
Registered: 2007-01-29
Posts: 279

Re: 2 issues: browse categories popup error & home pg uses wrong template

Oh, that’s a very clear explanation. Thanks, Els!

Offline

#8 2008-02-06 10:23:22

azw
Member
Registered: 2007-01-29
Posts: 279

Re: 2 issues: browse categories popup error & home pg uses wrong template

Mary wrote:

1. Re-read what that attribute is for. Unless you tell popup or the other category tags what section to use, it always uses the default section or front page.

Okay, I’ve done some tests. The section attribute controls several very different things:

1. which section will be used in the URI of the results,
2. which template will be used to draw the page with the results, and
3. which section the search for categories will be conducted in (i.e. it limits the search to the chosen section).

That’s not the behavior I need.

Can I de-couple the first two from the third? I want the results include articles tagged with the chosen category, but from any section throughout the entire site.

I’m hoping to achieve something similar to what I have with the search feature, in which the search_input tag has an attribute set to section=“search”. The results of the search don’t have to be from the “search” section to appear. In fact, there are no articles in that section.

Maybe I’m not understanding something fundamental.

Offline

#9 2008-02-06 18:34:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: 2 issues: browse categories popup error & home pg uses wrong template

Ah, now I understand what you want to do. I suppose it can be done by using the section attribute in the popup tag to point to the section page you want to use, and on that page don’t use <txp:article />, but use asy_wondertag with article_custom:

<txp:asy_wondertag><txp:article_custom category="<txp:category />" /></txp:asy_wondertag>

Offline

#10 2008-02-07 04:02:40

azw
Member
Registered: 2007-01-29
Posts: 279

Re: 2 issues: browse categories popup error & home pg uses wrong template

Ha! Now that’s a smart workaround! Thanks, again, Els.

Offline

Board footer

Powered by FluxBB