PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

News

extensions An important requirement of many content based PostNuke sites is the ability to freely position content on the frontpage. The position of articles should not only be depending on their chronological order of release but also on the decisions of editors. This has not been possible with the News module but it is possible with Pagesetter and 2 cooperating publication types.

The aim is to have 4 positions on top of a page where we can freely place selected articles. The rest of the page should be just a chronological list.

  1. Pagesetter 6.3 comes with 2 publication types preinstalled. One of which is the PN-News publication type, that we will use for our little project. You should begin by adding about a dozen testing articles to the database. lipsum.com might help to find the right words icon_wink
  2. We need another publication type that we use to position the articles. So we start creating one and call it "frontpage". It should have for data fields called "article1", "article2", "article3", "article4". All of them should be of the type "Publication" - click on the ..-button next to the type flied and select PN-News as reference. Finish the creation process by generating the full-template.
  3. Create a new publication of the "Frontpage" type. Select a different article for every of the 4 fields and submit (and approve) it.
  4. Go to the site setting and set Pagesetter as frontpage module. Start Function Type is "user", Start Function is "viewpub" and the arguments shoud be tid=3,pid=1 - This must be adjusted if the ID of the frontpage publication type is not 3.
  5. Go to your frontpage (index.php) it should now display the headlines of the 4 selected articles.
  6. You can now edit the frontpage-full.htm to fit your needs - you can use all the elements that you have in a normal Pagesetter template. You can show not only the headline but also the teaser, the image or even the full article. And you can use custom HTML to position the articles next to each other.
  7. If you now want to display the rest of your articles chronologically underneath our little frontpage you can do this with an inline list. We need another template for this: PN-News-inlineList.html - This template can be editited like the PN-News-list.html template with all the same options.
  8. When you have a basic layout for the inline list we have to include the call for the list inside the frontpage template, which is one API call:
    Code
    <!--[pagesetter_inlinePubList tid=1 pubcnt=7]-->
    This will display the latest 7 articles - you can adjust that figure to your needs.
  9. But stop! There are articles in the frontpage-selection that are also in the chronological list. To avoid this effect we have to include a filter that looks for double PIDs. Create filter and place the call before the inline list call:
    Code
    <!--[pagesetter_createFilter filter=core.pid:ne:`$article1`,core.pid:ne:`$article2`,core.pid:ne:`$article3`,core.pid:ne:`$article4` assign=listFilter]-->
    And you have to include the filter into the list call:
    Code
    <!--[pagesetter_inlinePubList tid=1 filter=$listFilter pubcnt=7]-->
  10. Finished! You can now always edit the frontpage publication to your needs and select the 4 most interesting articles for your readers. Of course you can add more articles to this system ASO. This article is only meant to inspire your own ideas.
  11. More cool stuff for Pagesetter can be found at pagesetter.net.

 
Posted by kaffeeringe.de  on Thursday, March 01, 2007 Comments (6) · 1559 Reads

6 Comments so far

(Latest comments )

Urd's Avatar

1. Urd wrote on Mar 01, 2007 at 03:57 PM

Is it just me, or is pagesetter.net not working (anymore)? I get a timeout while trying to resolve the IP. I even tried different ns servers, with no result.

dennisMe2's Avatar

2. dennisMe2 wrote on Mar 02, 2007 at 10:18 AM

It's not just you, unfortunately!

kaffeeringe.de's Avatar

3. kaffeeringe.de wrote on Mar 02, 2007 at 11:05 AM

It's down at the moment. But it will be back asap. icon_wink
moremojo's Avatar

4. moremojo wrote on Mar 03, 2007 at 09:31 PM

Sorry guys, some problems with ISP. This time I got fed up with it, so i'm moving my webservers to a different ISP. Server (and pagesetter.net) should be back up and running on tuesday.

Urd's Avatar

5. Urd wrote on Mar 05, 2007 at 02:03 PM

Thanks for the info icon_smile
moremojo's Avatar

6. moremojo wrote on Mar 06, 2007 at 09:36 AM

Allright, new provider, all is working again: http://www.pagesetter.net should be back online now.

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke