Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-10-22 16:59:42

caedmon5
New Member
Registered: 2006-10-22
Posts: 2

Re: Default section and Front page not the same anymore

I’ve been looking into this myself (I’m a newbie to Text Pattern, but have a pretty good understanding of the principles, I think).

Basically as I understand it there are two problems:
First of all, the “default” page is actually being used for three different things:
1) It is being used for “top page of the website” (i.e. ==index.html)
2) It is being used (when it is the top page of the website) as “aggregating container for all new items across all sections (that have their ‘use on front page’ box checked)” (i.e. ~= an automatic version of something like txp:article_custom category=“show_on_front_page”)
3) It is being used, everywhere else, as “use this if nothing else is specified” (i.e. ~= default.xsl + default.css)

The second problem is that the “use on front page” check box describes its function as being essentially concerned with whether or not a section’s items are to appear on the front page (connected to definition 1, above), when in fact it really is indicating whether or not a section’s contents are to be considered available to a cross section aggregator (definition 2, above).

I’d strongly suggest separating 1 & 2, and frankly, probably all three elements of the “default” definition, and renaming the “show on page button.” The function of cross-section aggregation is not the same as the form of the front page of a website (You might well want to collect news in a separate “news” area). And while the current default page makes a good default page in the sense of definition 3, above (because it allows for aggregation or single page display), this is independent of that second function of cross-section aggregation as well: it works as a default page because it contains tags to handle a variety of different contexts.

Perhaps the solution is to develop a <txp:article category=“available_for_cross_section_aggregation”/> element which could be used anywhere. In OO terms, I think you would describe this as a container that accepts objects that have inherited “available for cross section aggregation” from sections where the newly renamed “use on front page” checkbox has been checked. There is no reason why this could not be used anywhere.

Basically, I think the problem is that we are unnecessarily associating a function (cross section aggregation), with a specific position in the layout of a website (front page), and then confusing everything even more by using the same term to describe a fall-back page layout.

Offline

#14 2006-10-22 17:23:56

caedmon5
New Member
Registered: 2006-10-22
Posts: 2

Re: Default section and Front page not the same anymore

Sorry, thinking about it some more in the shower, I think I could be clearer.

The concept “default/front page” in Textpattern currently has four different meanings:

1 It can be a place == front page/index.html

2 It can be an editorial judgement == “Material in this section is newsworthy enough to be shown on the front page”

3 It can be a function == “Collect articles across sections who have the attribute “show on front page (~= I am newsworthy enough to be shown on the front page’)’”

4 It can be a stylesheet == “Use this to display articles if nothing else is specified”

All four need to be separated. You can have a front page without collecting all newsworthy items on it, deciding a section contains newsworthy articles does not mean they necessarily have to appear on the front page, and the default stylesheet is simply something we need to have.

The answer is still the same in my view. Separate Front and Default Pages, change the “show on front page” box to something like “newsworthy”, and build a tag <txp:article_custom category=“newsworthy”/>. The default page would presumably be more or less the same as it currently is; the front page would depend on its purpose and might well be the same as the default page (or not), and the txp:article_custom category=“newsworthy” tag would separate the function of collecting newsworthy stories from across sections from any one place.

Sorry to have to take two goes at it. I’m using a version of this as a hack at the moment and I needed to work out the details.

Last edited by caedmon5 (2006-10-22 17:25:30)

Offline

#15 2006-11-21 05:44:39

argentorange
Member
Registered: 2006-10-09
Posts: 12

Re: Default section and Front page not the same anymore

I second and third your feature request – I don’t see why there should be a problem with adapting the “show on Front Page” feature if we just get over the semantics. Have an “aggregate” page which has also has a “use this as your homepage” option.

Do I sound like I’m on drugs?

Offline

#16 2007-02-04 07:34:35

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

Re: Default section and Front page not the same anymore

Yes, separating these meanings/functions would be very helpful.

There’s no reason why we should be stuck with “default”. At the very least we should be able to change it’s name in the admin preferences, just as we can change the name of the location of image files, etc.

Offline

#17 2007-02-05 09:10:08

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

Re: Default section and Front page not the same anymore

At the very least we should be able to change it’s name…

You can: see the top of the sections tab.

Offline

#18 2008-02-06 10:03:42

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

Re: Default section and Front page not the same anymore

I’m still concerned about this problem.

As I understand it (please correct me if I’m wrong), that feature at the top of the sections page just lets us change which page template is used. It doesn’t change the name of the home page or its URI.

Is there a way to de-link the home page, and the categories results page? (I have found an easy way to replace the search results with its own section. That’s excellent.)

The problem is that for most static sites, the home page can’t be reused for the “default” page which shows any search or category results. If Textpattern is going to be useful for creating all kinds of sites, this will be an essential feature.

I’d like to see an option in the sections tab that lets you choose a section for the extraneous (non-home page) default uses.

Similarly, it be great to have another option that let you choose which section was the blog-like “front page” (the one that will be used to display the listing of all articles in the way that the current default page does).

In the meanwhile is there a work-around using conditionals or something else? Maybe there’s a way to display just my specific home page content if the home page is accessed, and also to make that specific home page info disappear if the search or categories features are called?

Offline

#19 2008-02-06 10:27:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Default section and Front page not the same anymore

you can use glx_if


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#20 2008-02-06 18:17:53

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

Re: Default section and Front page not the same anymore

azw wrote:

Maybe there’s a way to display just my specific home page content if the home page is accessed, and also to make that specific home page info disappear if the search or categories features are called?

<txp:if_search>
   ... search results ...
<txp:else />
   <txp:if_category>
      ... category list ...
   <txp:else />
      ... front page ...
   </txp:if_category>
</txp:if_search>

Offline

#21 2010-02-16 11:34:33

tennapel
Member
Registered: 2009-05-31
Posts: 62

Re: Default section and Front page not the same anymore

It would be very useful if any of the sections can be assigned as ‘default’. Now, you have to jump through hoops to generate a section-list as a navigation item on your website if you want to address one of the sections as the ‘home’ page and not use the homepage as an aggregator page.

The current default mechanism also makes it less flexible in the sense that you have to tinker with section-names in your templates or forms to make a section-based navigation item on your website for example this. For example, I want to designate ‘section_a’ as my default section

<ul id="nav">
<txp:if_section name="default">
    <li>
        <a href="<txp:site_url /><txp:section name="section_a" />/"><txp:section title="1" name="section_a" /></a>
    </li>
    <txp:section_list sections="section_a, section_b, section_c, section_d" break="">
        <li>
            <a href="<txp:site_url /><txp:section />/"><txp:section title="1" /></a>
        </li>
    </txp:section_list>
<txp:else />
    <txp:section_list sections="section_a, section_b, section_c, section_d" break="">
        <li>
            <a href="<txp:site_url /><txp:section />/"><txp:section title="1" /></a>
        </li>
    </txp:section_list>
</txp:if_section>
</ul>

I use the same template for all pages and use some rerouting in the template to pull in the same form for both the ‘default’ and the ‘section_a’ sections. Currently, this is the only way I know how to pull this off and it isn’t very uncommon for a website to explicitly define what the frontpage should be.

ps1: I am aware that you can use the ‘default’ as the ‘section_a’ page and do some renaming of the section display name in the section list with a few if_statements, but from a user perspective I find it hard to explain that an author has to assign the value ‘default’ in the sections dropdown while writing an article, to put it in ‘section_a’, that’s a very unfriendly workflow.

ps2: I am not suggestion to leave the default mechanism, since it has it use when the homepage is an aggregator page, I am suggestion to have an override mechanism.

Offline

Board footer

Powered by FluxBB