Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-14 20:20:27

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Default section and Front page not the same anymore

Edit: a formal Textbook Feature Request page as been added now.

Now : the default section/page and the front page are the same. This default page is mainly used to display Categories browsing (/category/catName) and Authors browsing (/author/authorName). It’s also the front page of a site.

Issue : the frontpage is similar to other articles page on a blog like website, but a lot of non blog websites use a specific frontpage. Some without even a txp:article tag in it. We can now detect the category browsing using a txp:if_category name="" / else trigger, but it’s a trick. And a trick not usable for author browsing. And a complex one to newcommers, who have to deal with nested conditionnal triggers on their first template/page coding.

Suggestion : make a distinction between the default section/page, and the frontpage. It’s more elegant (imo) and more simple to newcomers than another trick like a new txp:if_author name="" or something similar.

This would mean creating a new hardcoded FrontPage section, with a chosen page (exactly like the default section right now).

Any thoughts on this ?

Last edited by Jeremie (2006-03-19 05:04:16)

Offline

#2 2006-03-14 21:58:19

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Default section and Front page not the same anymore

Perhaps a preference to choose the section that should be used for the front page? This would allow you to easily switch from one front page design to another if you wanted to.

Scenario:

You usually just have your front page display latest entries in your articles section you could set your front page to point to your articles section. If you then need to temporarily change the front page to a design without your articles you could create that as a new section and point your front page to that section.

Problems:

This changes the current behavior of including articles form certain sections in the frontpage. Maybe a section attribute similar to the one in article_custom could be introduced. If empty <txp:article > would behave as it currently does, however you could specify the sections you want to pull from when in article_list mode. Maybe something like.

<txp:if_article_list>
<txp:article section="articles,news">
<txp:else>
<txp:article>
</txp:if_article_list>

this might be more complicated then I anticipated given the amount of context sensitive behavior that txp:article has.

Last edited by hakjoon (2006-03-14 21:58:55)


Shoving is the answer – pusher robot

Offline

#3 2006-03-14 22:30:09

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Default section and Front page not the same anymore

Redirecting the frontpage to a section is more trouble than anything I think. You can always switch the page if you need to.

Offline

#4 2006-03-14 22:40:36

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Default section and Front page not the same anymore

Seeing as Textpattern is more of a CMS than a Blog, I can see where this would be very useful.

When designing sites, depending on what system I grab, I’ll use a specific blog for the front page or in the case of Textpattern, use a specific section.

Wish I could get into the technical details with you all but I’m still in the learning phase at this point.

Offline

#5 2006-03-14 23:27:43

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Default section and Front page not the same anymore

Jeremie wrote:
Redirecting the frontpage to a section is more trouble than anything I think. You can always switch the page if you need to.

That was actually what I was thinking, I didn’t frame it properly. Assigning a page would accomplish the same thing I was trying to suggest.

Although it seems to me that other then the fact that it could change how on front page works, being able to specify which section is your frontpage section feels like a step in the right direction, rather then hard coding yet another special section.


Shoving is the answer – pusher robot

Offline

#6 2006-03-15 00:34:48

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Default section and Front page not the same anymore

Well, assigning a section to the frontpage can have side effects. How would the “show on frontpage” option would work then ?

On the other hand, there is already a default section. Creating another named frontpage and using it for the “show on frontpage” and other similars things shouldn’t be too hard.

Offline

#7 2006-03-15 03:42:58

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Default section and Front page not the same anymore

Jeremie wrote:
Well, assigning a section to the frontpage can have side effects. How would the “show on frontpage” option would work then ?

It wouldn’t, as I pointed out that would be one thing that would need to be re-evaluated. A potential solution would be to move that option to the template tag itself. There was aquick potential approach in my first post.

On the other hand, there is already a default section. Creating another named frontpage and using it for the “show on frontpage” and other similars things shouldn’t be too hard.

While it probably wouldn’t be that hard to implement, I wonder if it isn’t a paradigm worth re-evaluating. That’s not to say I think adding a frontpage section is a bad idea, quite the opposite in fact. I’m just wondering if there can maybe be a more flexible overall approach.


Shoving is the answer – pusher robot

Offline

#8 2006-03-15 05:51:11

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Default section and Front page not the same anymore

For the frontpage, I don’t see how.

For the default “section”, maybe. But without knowing for sure what can be expected for the categories and the authors (would cat’ be tags ? would /author/joe output some bio and metadata ? etc.) it’s hard to say.

Offline

#9 2006-03-15 15:57:07

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

Re: Default section and Front page not the same anymore

Hi Jeremie,
I second your feature request and I would like to point to the <a href=“http://forum.textpattern.com/viewtopic.php?id=4526”>glx_if</a> plugin which offers a solution to the front page versus the default section. I would love to see the conditionals offered in the plugin in the core of txp (the front page being the most important for me too.


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

Offline

#10 2006-03-19 05:03:40

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Default section and Front page not the same anymore

Textbook page added (gosh, this mediawiki markup is really foolish).

Offline

#11 2006-03-21 00:03:14

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: Default section and Front page not the same anymore

I’m still learning some of the quirks of Textpattern but can’t you just use the

<txp:if_section name=""> <txp:else /> </txp:if_section>

as a filter for the front page?


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#12 2006-03-21 01:22:35

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Default section and Front page not the same anymore

This test for a non section. But so are /author/ and /category/ browsing which are defined as non-sections too.

Offline

#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

Board footer

Powered by FluxBB