PostNuke

Flexible Content Management System

News

Flexible Frontpages with Pagesetter

Contributed by on Mar 01, 2007 - 04:51 PM

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 ;-)


  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][/code]
    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][/code]And you have to include the filter into the list call:
    [code][/code]


  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.

1929