Jump to content

Scalability of PW news system?


Godfrey
 Share

Recommended Posts

Hello,

I just went through the PW tutorial for making a simple news system: 

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

But after seeing the result, I'm wondering how this system would scale.

Because right now, it seems like if you're creating a new page for each post, things on the administrative UI side will get messy really quickly :

post-1217-0-31999900-1370555307_thumb.pn

I just imagine a really long list of articles as pages under "News Articles" looking like a nightmare.
 

I know I could modify the system so that each article displays a date, but still it just does not look pretty.

So I'm wondering whether most of you use some system similar to what is described in the Simple News System tutorial, or if you use something else. If so, what do you use? Do you integrate something else into Processwire? 

If not, how can I make this simple news system more clean and feasible? E.g. is there a way to further categorize/archive the articles?

I mean, I'm guessing that sites like http://www.cmscritic.com/ probably wouldn't use such a system for their powerful news system, would they? How did they do theirs? 

Link to comment
Share on other sites

Like Wanze I really like the way that articles paginate in the admin, but you can always create a page in the Admin that lists all the articles any way you prefer. A very simple way o do this is to link to a pre-defined search in the admin. So, imagining that you want to list all the articles, just go to advanced search, and with the search field empty, limit the search to the articles template; or if you want all articles from one category, "limit to the template": "article", "search in fields": "category" and "search for": "category name or ID". You can for instance create a new admin page using my Admin custom pages module with some pre-built links.
 
If you want a really clever system with this, study the urls that result from these searches, and create them dynamically by request.
domain.com/processwire/page/search/?field=category&operator=0&q=general_news&show_options=1&submit=Search&template=article&sort=created&display=title,path

post-88-0-18224400-1370559254_thumb.png

  • Like 2
Link to comment
Share on other sites

nice tip: if you remove "&showoptions=1" from the url, you will have only the list without the search options. So, a very simple example of a link would be:

echo "<a href='{$config->urls->admin}page/search/?submit=Search&template=article&category=general_news&sort=created&display=title,path,category,author'>all general news articles</a>";

edit: here is a quite silly example of how this could be used dynamically in a custom page (code and screenshot):

echo '<dl>';
foreach($pages->get(1)->children("include=all") as $p){
    echo '<dt>';
    echo $p->title;
    echo '</dt>';
    echo '<dd>';
    echo "<a href='{$config->urls->admin}page/search/?submit=Search&template={$p->template}&sort=created&display=title,path'>search all pages with same template as {$p->title}</a>";
    echo '</dd>';
}
echo '</dl>';

post-88-0-38926300-1370563198_thumb.png

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

Just a quick update to this older thread. I know it's still being linked to from some other posts.

Another possible solution (paid) is to use the ListerPro module to display news posts in the admin area.

I'm using it to create a paginated list of blog posts and I've another Lister view setup to display lists of posts with certain tags. 

Worth a look.

Link to comment
Share on other sites

I was just thinking that myself, Pierre.

Also, for anyone else picking up on this, that tutorial (pretty old now) is just one way you can organise articles or anything really.

There are a huge number of ways you can do it and lister pro opens up some opportunities, especially with the ability to sort and search.

And just to answer the scaling worry - well, depending on the server, going up to several hundred thousand pages should be no issue at all. 

But like any news system, how you manage that number of pages needs some creative thinking. However, unlike certain well known Article Management Systems, ProcessWire would allow the imaginative some very powerful content management options. 

Link to comment
Share on other sites

Because right now, it seems like if you're creating a new page for each post, things on the administrative UI side will get messy really quickly :

attachicon.gifnewssystem.png

I just imagine a really long list of articles as pages under "News Articles" looking like a nightmare.

Back to OP, I had reservations too when I first started using PW. It was the tree view I was concerned about too. IE I wondered how PW would handle a list of say, 200 sub-pages. Would users have to scroll way down a massive list of posts? Would the back end be slow? Once I started using PW, I realised this was a moot point as

  1. PW will paginate your pages within the admin every 50 or so pages. See screengrab of the PW Skyscrapers Demo and notice how the Architects pages are paginated and have very fast next/back arrows there too.
  2. PW is incredibly zippy and accessing any page takes no time even when you have to drill down into sections
  3. The admin search is very fast so you cna jump right to a page if you know the title or contents
  4. PW 2.5 has a Recent Pages link which is very handy
  5. Again, there's the Lister Pro module too which is an extra bonus

post-1166-0-87329800-1415721265_thumb.pn

  • Like 3
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...