Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-01-13 23:31:29

capatxp
Member
Registered: 2013-01-12
Posts: 21

Default ... do I need it?

I’m creating a news web site. I’m focusing on two sections now, “News” and “Sports” (and “Default”)

Initially I was planning on the home page show a list of news articles at top, then a list of sports articles below that. Then the reader could click on the “News” section and that section would show only news, and then do the same thing for sports.

Then I decided just to make the “News” page the home page. So when you go to the site you see the “News” page and only news articles. Then to see sports articles they’d click on the “Sports” link on the navigation menu.

Pretty simple, eh?

So what, then, should I do with “Default”? Just lay out the pages so that it does not show up as an option in the navigation menu? Or is there some better way to make use of “Default”?

I tried re-titling “Default” as “News” thinking it could be my news page, but that didn’t work of course ‘coz Default lists all articles.

Offline

#2 2013-01-14 00:00:15

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: Default ... do I need it?

I will maintain the default and news sections. If your site have a search, the results page will be at default section (it is not news or sports, it is a general search) and is not very difficult to find another kind of situations where you are not in news or sports section (author pages, category by themes, “copyright” /“about us” / “legal footprint” articles…).

You can show news on both section homes (default and News) but in a different way. For instance 10 at default and 20 at News, with o without big/small photo, excerpted…

If you still don’t find a benefit on have a default and a News home, you can always avoid to link to the news home so you will need to hide it to the users, that normally implies hand-made navigation items, but in your case it is not really difficult (link to default and to sports for main navigation, excluding news).

Anyway I believe that finally you will find the diference between default and the rest o sections really usefull.


<txp:rocks/>

Offline

#3 2013-01-14 06:32:52

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

Re: Default ... do I need it?

beside Joges very valid points, for a news site I would definetely keep the default for future growth. For example a news site might also include an entertainment and a culture section eventually. You might eventually decide that all sections should appear ind divs on the front page.


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

Offline

#4 2013-01-16 00:29:32

capatxp
Member
Registered: 2013-01-12
Posts: 21

Re: Default ... do I need it?

How does one make sections appear in divs like that?

Offline

#5 2013-01-16 06:35:36

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

Re: Default ... do I need it?

capatxp wrote:

How does one make sections appear in divs like that?

Using article_custom with a code like:

<txp:if_section name="default">
<txp:if_search>
<txp:article pgonly="1" searchall="0" searchsticky="1" />
<txp:if_search_results>
<h3 >You searched for <strong><txp:page_url type="q" /></strong>. <txp:search_result_count />.</h3>
<txp:else />
<p>Your search for <strong><txp:page_url type="q" /></strong> did not match any documents.</p>
</txp:if_search_results>
<txp:article searchall="0" />
<txp:else />
<div class="news"><txp:article_custom section="news"><h3><txp:title /></h3><txp:excerpt /></txp:article_custom></div>
<div class="sports"><txp:article_custom section="sports"><h3><txp:title /></h3><txp:excerpt /></txp:article_custom></div>
</txp:if_search>
</txp:if_section>

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

Offline

#6 2013-01-16 06:41:47

capatxp
Member
Registered: 2013-01-12
Posts: 21

Re: Default ... do I need it?

Swate

Thanks … I could make use of “default” like that.

Offline

#7 2013-01-17 01:25:03

capatxp
Member
Registered: 2013-01-12
Posts: 21

Re: Default ... do I need it?

Thanks for yer help! Here is the result:
http://www.bozemanfreepress.com/txp/ (still a work in progress, but the main structure is largely in place now.)

Lemme point out what’s going on there:
1) there are 7 “news” stories, all of which happened to be titled “Jan X blah blah”. I used colak’s code above to segregate these 7 “news” stories from the single “sports” story (Seahawks lose) below. “News” on top; “sports” below.
2) Articles are listed newest->oldest BUT some stories are flagged “important” (I identify these stories by putting ‘main’ in the headline — as in “main story” of the day. Otherwise a story is “secondary” with no flag.)
3) Stories from the SAME DAY which are flagged are listed ABOVE non-flagged stories published that same day. This way a story titled “Downtown Explodes!!!” on Jan. 3 does not wind up below a story titled “Oh these kittens are soooo cute!” also published on Jan. 3.

Offline

Board footer

Powered by FluxBB