Jump to content

How would you build a daily newspaper


sakkoulas
 Share

Recommended Posts

hi everyone,
i will appreciate some help of you.
if you had to build a news portal with multiple categories and tons of articles, How would you build it?


solution 1
home page
category 1
    item
    item
category 2
    item
    item

solution 2
    Home Page
        news
            category1| template 1
                article | template 1,2
                article | template 1,2
            category2 | template 2
                article | template 2,2
                article | template 2,2
solution 3        
Home Page
    news | template 1
        article -> page field selected category | template 2


article -> page field selected category | template 2

article -> page field selected category | template 2

category page field
    category 1
    category 2
    category 3
of course i have study Ryans blog module  and i know  he use the third solution but i am afraid if this style gone be hard after some thousands of articles to be filtered, searched. thanks

Link to comment
Share on other sites

I am putting together a blog solution at the moment and the way I am doing it is this: (remembering that this is just one way)

Main Menu:

Home (er, obviously)

Category 1

-- subcat

---- subcat

Category 2

-- subcat

---- subcat

Category 3

-- subcat

---- subcat

---- subcat

---- subcat

------ subcat

Category 4

-- subcat

---- subcat

So, those could for instance be Sport, Politics, Media and so on with a category tree underneath of any complexity.

Articles are actually just being added as children to a hidden page called Articles and have a page field to select one category. They are all in one list (as with things like WordPress) though you could break them up if you wanted for management purposes. It does help for development purposes, if all your articles have either the same parent OR the same template (one or the other). It makes dealing with them easier. In my case, because I have very different post types (and therefore associated templates) I have gone for a common parent approach and will rely on the search or the front end to find things :)

Then...

I have a pile of tags under a hidden page called Tags. These are also selected by the article using a page field, but you can select multiple tags and add new ones.

I also have Topics, again under a hidden page. You can make any article select several topics, but not add new ones. Topics are being used as cross references. So you may have a topic called "Politics in sport."  This would be used for an article about sport that had a political bent that you want listed primarily in the Sport category.

I also have authors, which can be yet another sort method.

EDIT: Almost forgot, I have several article types - Video, Photoblog, Standard Blog, and so on. So articles can be filtered and listed using that criteria (basically which template is being used).

Second Menu

I have a top bar that has dropdowns for all topics and all categories as a quick link/cross link system. You can also search just as normal or filter the search by category and/or topic. The top bar also will have links to About and Contact so that the main menu is very much dedicated to just the articles.

That is the basic skeleton.

After that, it is down to useful tools. For instance I have created a widget that lists recent posts in the same category as the post you are viewing is in. I could also create one that worked on topics. 

You could use the categories as either single entities where each category only lists those articles that belong to it, or you could use them as filters. So, a top level category would list all articles belonging to it and any sub categories, a subcat likewise and so on down the tree.

There are rather a lot of ways to skin the ProcessWire pet cat, to be honest.

The main thing with news (which is nothing to do with ProcessWire as such) is that you have to allow quick and random browsing through main areas (like you would with a printed newspaper so your home page (and other pages) should lay out your wares nice and clearly, and you need to make sure you have some sort of editorial control with different groups allowed to do different things.

In principle, my approach is similar to Ryan's. but with some variations that suit my brain!

  • Like 1
Link to comment
Share on other sites

Hi Sakkoulas

By article types I mean I have created different templates to suit certain ideas. A standard blog type article, a Photo Post where the images is the most important issues, perhaps a review style template or a recipe ... anything really.

A Page Field is a field type in ProcessWire that allows you to select one or more pages from the page tree.

That means you can use it for including one page within another, or use pages to create select options or, in this case, to relate one page to another as you would with categories or tags and so on.

This is an incomplete Wiki article about the page field showing how it can be used to create selects. But it will give you a clue about its greater use. 

http://wiki.processwire.com/index.php/Page_Field

I am not sure what you mean about directories ...

Joss

Link to comment
Share on other sites

ok i understand, i think,  every time you insert a new article you must also select template for the current article

with directories i mean

all articles
  sport
     soccer
       local soccer team
          article 1
     basketball
  politics
    ..
    ...
  economy

 

Link to comment
Share on other sites

With Processwire there are no directories in the admin. 

It is all pages.

Pages can be used for anything (not just a page full of information). 

They can be used as a placeholder, or an option for a select (using the page field), or as an actual container for data.

Your articles are pages, your categories are pages, your tabs are pages.

What makes them different is that you would use a particular template to reflect what that page needs to achieve.

Those templates may not have a template file associated with them - you only need to do that if you are formatting the data held in that page AND calling the page directly. (You can get information from another page by using $pages rather than $page)

All pages do have relationships to parents and children, and using their template, you can dictate how that relationship works.

For instance if you had a hidden page called "Posts" under home, and it had a template called "Post-Placeholder" which had no fields other than the title field, then you can set the template so that any children of "Posts" had to have a particular template - your "news" template, for instance.

So you can limit the choices to make the system more manageable.

It is up to you what a page is pretending to be, if you like!

Just play with multiple pages and templates and you will soon see how you can relate them together and therefore how you can design just about any structure you need.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...