Credits & License Information
Back to main Credits pageHelp for Pagesetter version 6.3.0.0
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Pagesetter 6.3 manual</title><link rel="stylesheet" href="docbook.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="description" content="This manual documents how the web publishing tool Pagesetter for PostNuke works. Pagesetter is a publishing
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator."><meta name="keywords" content="Pagesetter, PostNuke, Publishing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a name="id4482096"></a>Pagesetter 6.3 manual</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Jørn</span> <span class="surname">Wildt</span></h3></div><p class="othercredit"><span class="contrib">DocBook conversion</span>: <span class="firstname">Axel</span> <span class="surname">Guckelsberger</span></p></div></div><div><p class="releaseinfo">Version 6.3-1</p></div><div><p class="copyright">Copyright © 2004 The Pagesetter Development Team</p></div><div><div class="legalnotice"><a name="id4699241"></a><p>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version
1.2 or any later version published by the Free Software Foundation, with
no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A
copy of the license can be obtained from the <a href="http://www.gnu.org/licenses/fdl.txt" target="_top">Free Software
foundation</a></p></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This manual documents how the web publishing tool Pagesetter for PostNuke works. Pagesetter is a publishing
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#chap_introduction">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#introductionstart">Introduction</a></span></dt><dt><span class="section"><a href="#introductionfeatures">Features</a></span></dt><dt><span class="section"><a href="#introductioninstallation">Installation</a></span></dt><dt><span class="section"><a href="#introductionfolder">Organizing Publications</a></span></dt><dt><span class="section"><a href="#introductionprinting">Printing This Manual</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_tutorial">2. Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="#tutstart">Tutorial</a></span></dt><dt><span class="section"><a href="#tutcreatinst">Creating a Publication Instance</a></span></dt><dt><span class="section"><a href="#tuttemplates">Templates</a></span></dt><dt><span class="section"><a href="#tutfrontpage">Putting the News on the Frontpage</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_permissions">3. Permissions</a></span></dt><dd><dl><dt><span class="section"><a href="#permissionsintro">Permissions</a></span></dt><dt><span class="section"><a href="#permissionstopic">Topic Based Permissions</a></span></dt><dt><span class="section"><a href="#permissionssingle">Permissions for Single Publications</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_editingpubs">4. Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsintro">Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsinformation">Publish information</a></span></dt><dt><span class="section"><a href="#editpubslocation">Location</a></span></dt><dt><span class="section"><a href="#editpubsauthor">Author Information</a></span></dt><dt><span class="section"><a href="#editpubssetting">Setting Editor Defaults</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_pubtypes">5. Publication Types</a></span></dt><dd><dl><dt><span class="section"><a href="#pubtypesstart">Publication Types</a></span></dt><dt><span class="section"><a href="#pubtypesfieldtypes">Field Types</a></span></dt><dd><dl><dt><span class="section"><a href="#id4702522">Upload handling</a></span></dt></dl></dd><dt><span class="section"><a href="#pubtypespubsetup">Publication Setup</a></span></dt><dt><span class="section"><a href="#pubtypescategories">Categories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_linking">6. Linking</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingintro">Linking</a></span></dt><dt><span class="section"><a href="#linkingsorting">Sorting</a></span></dt><dt><span class="section"><a href="#linkingfiltering">Filtering</a></span></dt><dd><dl><dt><span class="section"><a href="#id4704975">Indirect Operands</a></span></dt></dl></dd><dt><span class="section"><a href="#linkingsettingdefaults">Setting Defaults for Editor</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingsettingtopic">Setting Default Topic</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_templates">7. Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesintro">Templates</a></span></dt><dt><span class="section"><a href="#templatesvarstart">Template Variables</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesvarlistitems">Using Categories</a></span></dt><dt><span class="section"><a href="#templatesvarpageable">Using Pageable Fields</a></span></dt><dt><span class="section"><a href="#id4703438">Using upload fields</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesvarhitcounts">Showing Hit Counts</a></span></dt><dt><span class="section"><a href="#templatesvaredit">Showing "Edit This" Link</a></span></dt><dt><span class="section"><a href="#templatessinglemultiplestart">Single and Multiple List Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatessingle">Single Template</a></span></dt><dt><span class="section"><a href="#templatesmultiple">Multiple Templates</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesthemespecific">Theme Specific Templates</a></span></dt><dt><span class="section"><a href="#templatesoperations">Template Operations</a></span></dt><dt><span class="section"><a href="#templatesauto">Auto Generated Templates</a></span></dt><dt><span class="section"><a href="#templatespnrenderplugins">pnRender Plugins</a></span></dt><dt><span class="section"><a href="#templatesrelations">Relating Items to Each Other</a></span></dt><dt><span class="section"><a href="#templatesfolder">Folder Templates</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_relations">8. Publication Relations</a></span></dt><dd><dl><dt><span class="section"><a href="#relationsintro"></a></span></dt><dt><span class="section"><a href="#relationspublication">Parent-Child Relations—The Publication Field</a></span></dt><dt><span class="section"><a href="#relationsrelation">Relating to multiple publication instances</a></span></dt><dt><span class="section"><a href="#relationsbrief">Some pitfalls concerning the relationship feature</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_postnukefeatures">9. PostNuke Features</a></span></dt><dd><dl><dt><span class="section"><a href="#pnfeatureswaiting">Waiting Block</a></span></dt><dt><span class="section"><a href="#pnfeatureslistblock">List Block</a></span></dt><dt><span class="section"><a href="#pnfeaturesoldstories">Old Stories Block</a></span></dt><dt><span class="section"><a href="#pnfeaturespubblock">Publication Block</a></span></dt><dt><span class="section"><a href="#pnfeaturesrandomblock">Random Publication Block</a></span></dt><dt><span class="section"><a href="#pnfeaturescatbased">Category Based Menu Block</a></span></dt><dt><span class="section"><a href="#pnfeatureshooks">PostNuke Hooks</a></span></dt><dt><span class="section"><a href="#pnfeaturessearch">PostNuke Searching</a></span></dt><dt><span class="section"><a href="#pnfeaturesshorturls">Short URLs</a></span></dt><dt><span class="section"><a href="#pnfeaturescaching">Caching in pnRender</a></span></dt><dt><span class="section"><a href="#pnfeaturesfolder">Organizing Publications</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_extrafeatures">10. Extra Features</a></span></dt><dd><dl><dt><span class="section"><a href="#extrafeaturesrssfeeds">RSS Feeds</a></span></dt><dt><span class="section"><a href="#extrafeaturestitlehack">Title-Hack</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeproc">FEProc Integration</a></span></dt><dd><dl><dt><span class="section"><a href="#extrafeaturesfeprocstart">FEProc Integration</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeprochandler">Pagesetter FEProc Handler</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeexample">Example - An Event Registration Setup</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_extratools">11. Extra Tools</a></span></dt><dd><dl><dt><span class="section"><a href="#extraimport">Importing Data</a></span></dt><dd><dl><dt><span class="section"><a href="#importnews">Importing From PostNuke News</a></span></dt><dt><span class="section"><a href="#extraimportce">Importing From ContentExpress</a></span></dt><dt><span class="section"><a href="#extraimportpc">Importing From PostCalendar</a></span></dt><dt><span class="section"><a href="#extraimporting">Importing Pagesetter Publication Types</a></span></dt></dl></dd><dt><span class="section"><a href="#extraexporting">Exporting Pagesetter Publication Types</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_workflows">12. Workflows</a></span></dt><dd><dl><dt><span class="section"><a href="#wfdefinition">Definition</a></span></dt><dt><span class="section"><a href="#wfstandardwfstart">Standard workflows</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_customisation">13. Customisation</a></span></dt><dd><dl><dt><span class="section"><a href="#custcss">Style Sheets</a></span></dt><dt><span class="section"><a href="#custinputforms">Input Forms Layout</a></span></dt><dt><span class="section"><a href="#customplugin">Input plugins</a></span></dt><dt><span class="section"><a href="#custhtmlarea">HTMLArea Editor</a></span></dt><dt><span class="section"><a href="#id4707674">Internal templates</a></span></dt><dt><span class="section"><a href="#custpostsubmit">Post Submit Handler</a></span></dt></dl></dd><dt><span class="part"><a href="#appendix">I. Appendix</a></span></dt><dd><dl><dt><span class="appendix"><a href="#chap_credits">A. Useful Hints</a></span></dt><dt><span class="appendix"><a href="#chap_credits">B. Credits</a></span></dt><dt><span class="appendix"><a href="#gfdl">C. GNU Free Documentation License</a></span></dt><dd><dl><dt><span class="section"><a href="#gfdl-0">PREAMBLE</a></span></dt><dt><span class="section"><a href="#gfdl-1">APPLICABILITY AND DEFINITIONS</a></span></dt><dt><span class="section"><a href="#gfdl-2">VERBATIM COPYING</a></span></dt><dt><span class="section"><a href="#gfdl-3">COPYING IN QUANTITY</a></span></dt><dt><span class="section"><a href="#gfdl-4">MODIFICATIONS</a></span></dt><dt><span class="section"><a href="#gfdl-5">COMBINING DOCUMENTS</a></span></dt><dt><span class="section"><a href="#gfdl-6">COLLECTIONS OF DOCUMENTS</a></span></dt><dt><span class="section"><a href="#gfdl-7">AGGREGATION WITH INDEPENDENT WORKS</a></span></dt><dt><span class="section"><a href="#gfdl-8">TRANSLATION</a></span></dt><dt><span class="section"><a href="#gfdl-9">TERMINATION</a></span></dt><dt><span class="section"><a href="#gfdl-10">FUTURE REVISIONS OF THIS LICENSE</a></span></dt><dt><span class="section"><a href="#gfdl-addendum">ADDENDUM: How to use this License for
your documents</a></span></dt></dl></dd></dl></dd></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>1.1. <a href="#id4698997">Screenshot illustrating a News item constructed with Pagesetter</a></dt><dt>4.1. <a href="#id4698730">Editing publications - user data</a></dt><dt>4.2. <a href="#id4698757">Editing publications - meta data</a></dt><dt>5.1. <a href="#id4701203">Publication type editing.</a></dt><dt>5.2. <a href="#id4702668">Editing categories</a></dt><dt>6.1. <a href="#id4704876">Example categories used for books</a></dt><dt>6.2. <a href="#id4704993">Indirect operands used in input formular</a></dt><dt>9.1. <a href="#id4706572">Example menu block based on a category setup</a></dt><dt>11.1. <a href="#id4699705">Various import tools.</a></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#id4700275">Permission levels</a></dt><dt>3.2. <a href="#id4700516">Examples for permission setups</a></dt><dt>3.3. <a href="#id4698430">Permission setup for access to a single publication item.</a></dt><dt>6.1. <a href="#id4702898">URL parameters</a></dt><dt>6.2. <a href="#id4701989">Template overview by URL function</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="#id4700041">Example template for News item.</a></dt><dt>6.1. <a href="#id4704482">Ordering by core fields</a></dt><dt>6.2. <a href="#id4704518">Ordering by category fields and category field properties</a></dt><dt>6.3. <a href="#id4704802">Filtering</a></dt><dt>6.4. <a href="#id4704902">Filtering by category fields</a></dt><dt>7.1. <a href="#id4703514">Example template with upload field (named "document").</a></dt><dt>7.2. <a href="#id4706217">Relating items by topic.</a></dt><dt>7.3. <a href="#id4706242">Parent/child relations.</a></dt><dt>7.4. <a href="#templatemanytomanyexample">Many-to-Many relations.</a></dt><dt>9.1. <a href="#id4705313">Example of search form taken from the standard PostNukeSilver theme.</a></dt><dt>13.1. <a href="#id4707660">Adding a CSS class selector to HTMLArea's right-click
context menu.</a></dt></dl></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_introduction"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#introductionstart">Introduction</a></span></dt><dt><span class="section"><a href="#introductionfeatures">Features</a></span></dt><dt><span class="section"><a href="#introductioninstallation">Installation</a></span></dt><dt><span class="section"><a href="#introductionfolder">Organizing Publications</a></span></dt><dt><span class="section"><a href="#introductionprinting">Printing This Manual</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionstart"></a>Introduction</h2></div></div></div><p>Pagesetter is a publishing
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator. The goal is
ultimately to be able to define all the kinds of publications that
normally require different PostNuke modules. The list includes:</p><div class="itemizedlist"><ul type="disc"><li><span class="emphasis"><em>News</em></span> items with a headline, teaser text,
news text, and an associated image.
</li><li><span class="emphasis"><em>FAQ</em></span> items consisting of a question and an
answer.
</li><li><span class="emphasis"><em>Recipes</em></span> with a title, a list of
ingredients, and instructions.
</li><li><span class="emphasis"><em>Task lists</em></span></li><li><span class="emphasis"><em>Course descriptions</em></span></li><li><span class="emphasis"><em>Music collections</em></span></li><li><p>… and so on.</p></li></ul></div><div class="figure"><a name="id4698997"></a><p class="title"><b>Figure 1.1. Screenshot illustrating a News item constructed with Pagesetter</b></p><div class="mediaobject"><img src="img/pubTemplate.jpg" alt="Screenshot illustrating a News item constructed with Pagesetter"></div></div><p>See the <code class="filename">readme.txt</code> for installation instructions.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionfeatures"></a>Features</h2></div></div></div><div class="itemizedlist"><ul type="disc"><li>
User defined publication types with a variable number of input
fields of many different kinds.
</li><li>
Templatable output lets the adminstrator layout the publications
in almost any way he want using PostNuke's pnRender system.
</li><li>
The what-you-see-is-what-you-get (WYSIWYG) editor htmlArea
simplifies input—no need for knowing HTML codes.
</li><li>
Multiple nested categories can be created and used for input fields.
</li><li>
Multi-page entries.
</li><li>
Flexible workflow system with plugins to extend it.
</li><li>
Revision control—Pagesetter stores the complete history of
all changes to any publication.
</li><li>
File uploads can be associated with all publications. With this
feature you can design your own document management system,
complete with workflows and revision control, or just upload
images with your News items.
</li><li>
Dates can be selected with a built-in date picker.
</li><li>
Top performance with cached output.
</li><li>
Two level approval control of publishing.
</li><li>
Publications can be timed with a start and end date.
</li><li>
PostNuke homepage can be set to show any list of publications
you want.
</li><li>
Pagesetter is PostNuke hooks compatible which means you can
enable comments, scoring, Auto-links and many other features with just
a few clicks.
</li></ul></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductioninstallation"></a>Installation</h2></div></div></div><p>Please read the "install.txt" file for instructions.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionfolder"></a>Organizing Publications</h2></div></div></div><p>Pagesetter publications can be organized in a folder structure with the
help of another module "Folder" from www.elfisk.dk. Without this module you
can browse through linear lists of publications with Pagesetter itself.</p><a href="#pnfeaturesfolder" title="Organizing Publications">Read more in the PostNuke Features chapter</a>.
</div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionprinting"></a>Printing This Manual</h2></div></div></div><p>The CSS styles in the HTML version has been carefully selected to generate
a nicely formatted printout. This has although only been tested on the
Internet Explorer 6.0. If you choose to print the manual then please
remember to set the paper format to A4 portrait. You should have left and
right margins set to 5mm.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_tutorial"></a>Chapter 2. Tutorial</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#tutstart">Tutorial</a></span></dt><dt><span class="section"><a href="#tutcreatinst">Creating a Publication Instance</a></span></dt><dt><span class="section"><a href="#tuttemplates">Templates</a></span></dt><dt><span class="section"><a href="#tutfrontpage">Putting the News on the Frontpage</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutstart"></a>Tutorial</h2></div></div></div><p>Let us start with a quick tutorial showing how to setup your very
first Pagesetter publication. For this we use a News type as an example.
With this publication type we will be able to write News with a title,
a short header, full text, and an associated image selected from Mediashare</p><p>Make sure you have admin rights on your PostNuke site and then goto
the Pagesetter administration page. Here you will see a list of
publication types. It should look like this:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeList.jpg"></div></div><p>Pagesetter has, as you can see, created a PN-News publication type
for you already. You can ignore this or use it as a reference for this tutorial.
When you are finished with the tutorial you should have a publication type more or
less identical to the predefined.</p><p>Now click "New Publication Type" which will bring you to this
window where you give a name to your new publication type and then create it:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate1.jpg"></div></div><p>Click "Next" which will bring you to the window below where you can start adding
the input fields you want for your publication type:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate2.jpg"></div></div><p>Use the green and red +/- symbols to add and delete fields. Make
sure you name everything exactly as you see it in the image (description
text is unimportant).</p><div class="itemizedlist"><ul type="disc"><li>The <span class="emphasis"><em>title</em></span> radio button indicates which field to
use as title field in the various Pagesetter lists.</li><li>The <span class="emphasis"><em>mandatory (M)</em></span> checkbox indicates that the user
<span class="emphasis"><em>must</em></span> enter something in the data field.</li><li>The <span class="emphasis"><em>Searchable (S)</em></span>
checkbox selectes which fields to use when searching for something on your
website.</li><li>The <span class="emphasis"><em>multiple
pages (MP)</em></span> checkbox allows you to define which field the user may
insert page breaks in. <span class="emphasis"><em>Only one field may be selected for
multiple pages, but none need to be so.</em></span> Page breaks can be
inserted using the editor button for it or inserted manually with a <hr
class="pagebreak"/> tag. The templating system then ensures the field
is split into pages separated by that tag.</li></ul></div><p>Click "Next" again and you will get to the last screen where you can select which
templates you want to create:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate3.jpg"></div></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3>UNCHECK ALL TEMPLATE CHECKBOXES (for this tutorial)!
Otherwise the nice default PN-News templates will be overwritten with boring autocreated
ones!</div><p>The "List Setup" settings
specify sorting order and such like for this publication type when an
overview is requested—for instance when Pagesetter is chosen as the
frontpage module in PostNuke's admin settings. The sequence of the fields
does also define the sequence in which they are presented when creating a
new publication instance. Now you are ready to submit the publication type
to the database. Press "Commit" and you are done.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutcreatinst"></a>Creating a Publication Instance</h2></div></div></div><p>Now that we have a publication type available (News) we should start
publishing something. Select the "New" link in the publication types
window:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeList_new.jpg"></div></div><p>This will bring you to the "Publication Edit" window:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubEditData.jpg"></div></div><p>Entering the text should be straight forward. The image URL can be
selected from Mediashare (if installed) by clicking the "..." button. Now
press "Save" and you are done and will be brought to the publication
list:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubList.jpg"></div></div><p>If you have named all your fields correctly then you should be able
to view your new publication through the pre-installed templates. Click
the <span class="emphasis"><em>view</em></span> action and you should see:</p><div class="informalfigure"><div class="mediaobject"><img src="img/publication.jpg"></div></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>You must enable images (with attributes!) and other HTML tags in PostNuke's setup
before you can display any images. If you forget this then you will only see the text "<img ...>"
instead of the actual image.</p><p>You must also enable popups for your site if you have any popup blockers installed, otherwise
HTMLArea and previewing won't work.</p><p>You must also have EZComments installed to get the News example running with the
templates in the examples directory.</p></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tuttemplates"></a>Templates</h2></div></div></div><p>The template used to display your data is named
<code class="filename">PN-News-full.html</code> and is located in the <code class="filename">pntemplates</code>
directory. As you can see the name consists of the
publication name concatenated with a dash and a template format name (in
this case "full"). If you open the file you will see something
like:</p><div class="example"><a name="id4700041"></a><p class="title"><b>Example 2.1. Example template for News item.</b></p><pre class="programlisting">
// (the html presented is not the most correct with respect
// to accessibility and xhtml compliancy)
<div style="width: 500px;">
<div class="pn-title"><!--[$title]--></div>
<div class="pn-sub">By: <!--[$core.author]-->
(<!--[$core.creator]-->)
<!--[$core.lastUpdated|date_format:"%Y.%m.%d"]--></div><p>
<table>
<tr>
<td valign="top">
<!--[$text[$core.page]]--><br>
<!--[if $core.pageCount > 1 ]-->
Page: <!--[pagesetter_pager]-->
<!--[/if]-->
</td>
<td valign="top">
<!--[if $image != "" ]-->
<img src="<!--[$image]-->" width="200"
alt="<!--[$imagetext]-->"
title="<!--[$imagetext]-->"><br>
<i><!--[$imagetext]--></i>
<!--[/if]-->
</td>
</tr>
</table>
<p>
<table width="100%"><tr>
<td><!--[$core.printThis]--> | <!--[$core.sendThis]-->
| Hits: <!--[nocache]--><!--[$core.hitCount]--><!--[/nocache]-->
| <!--[nocache]--><!--[$core.editInfo]--><!--[/nocache]--></td>
<!--[if $core.pageCount > 1 ]-->
<td align="right">(Page <!--[$core.page+1]-->
of <!--[$core.pageCount]-->)</td>
<!--[/if]-->
</tr></table>
</div></pre></div><p>The <!--[ ]--> HTML
comments contain code for the pnRender templating system. Basically you
can put $fieldName into them to show your publication fields, but more
complex stuff like switching statements and for-loops can be added too.
The variable name $core is predefined by Pagesetter and contains core
information about the publication like author and creation date.
<span class="emphasis"><em>Do not edit the template directly. Copy it instead to a theme
specific template and put it into your themes directory as described in
the template chapter.</em></span> Read more about templates in the <a href="#chap_templates" title="Chapter 7. Templates">Template chapter</a>.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutfrontpage"></a>Putting the News on the Frontpage</h2></div></div></div><p>If you want to show your News items on the frontpage of your
PostNuke installation, you need to find the admin section of PostNuke and
then go into the settings section. Here you find a dropdown somewhere
where you can select Pagesetter as the frontpage module. But before that
you need to tell Pagesetter which publication type to show on the
frontpage. Go to the general settings of Pagesetter:</p><div class="informalfigure"><div class="mediaobject"><img src="img/menuGeneral.jpg"></div></div><p>and select the News publication type for the frontpage:</p><div class="informalfigure"><div class="mediaobject"><img src="img/configuration.jpg"></div></div><p>If everything goes as expected you should be able to see the News
list on the frontpage (thanks to <a href="http://www.postnuke.dk" target="_top">www.postnuke.dk</a> for design
inspiration):</p><div class="informalfigure"><div class="mediaobject"><img src="img/publications.jpg"></div></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_permissions"></a>Chapter 3. Permissions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#permissionsintro">Permissions</a></span></dt><dt><span class="section"><a href="#permissionstopic">Topic Based Permissions</a></span></dt><dt><span class="section"><a href="#permissionssingle">Permissions for Single Publications</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionsintro"></a>Permissions</h2></div></div></div><p>Pagesetter works with five different access levels:</p><div class="variablelist"><dl><dt><span class="term">Readers</span></dt><dd>
Users who are allowed to read Pagesetter
publications.
</dd><dt><span class="term">Authors</span></dt><dd>
Users who are allowed to submit new publications but do not
have access to the list of existing publications.
</dd><dt><span class="term">Editors</span></dt><dd>
Users who are allowed to submit new publications and have
access to the list of publications.
</dd><dt><span class="term">Moderators</span></dt><dd>
Users who are allowed to submit and delete publications, as
well as moving them back and forth to the depot.
</dd><dt><span class="term">Administrators</span></dt><dd>
Users who are allowed to create new publication types as
well as performing other administrative Pagesetter tasks.
</dd></dl></div><p>On top of the raw PostNuke
permission system, Pagesetter adds it's own <span class="emphasis"><em>workflow</em></span> system.
Through this it is possible to specify who has access to what and when.
The workflow system is able to handle such diverse setups as a <a href="http://en.wikipedia.org/wiki/Wiki" target="_top">Wiki</a> framework (well,
something that simulates it to a certain degree) and an enteprise level
workflow with authors, editors and moderators. Read more in the <a href="#chap_workflows" title="Chapter 12. Workflows">workflow chapter</a>.</p><p>The Pagesetter permission levels are mapped into the PostNuke
permissions like this:</p><div class="table"><a name="id4700275"></a><p class="title"><b>Table 3.1. Permission levels</b></p><table summary="Permission levels" border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>readers</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Read</td></tr><tr><td>authors</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Edit</td></tr><tr><td>editors</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Add</td></tr><tr><td>moderators</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Delete</td></tr><tr><td>admins</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Admin</td></tr></tbody></table></div><p>In the table <span class="emphasis"><em>tid</em></span> is used as the publication
type ID and <span class="emphasis"><em>pid</em></span> as the publication (instance) ID. You
can use these to give access to specific subsets of the publications. The
special instance is '::' which matches <span class="emphasis"><em>both</em></span> all
publications <span class="emphasis"><em>and</em></span> the generic test for access to the
Pagesetter module. Here is a few examples:</p><div class="table"><a name="id4700516"></a><p class="title"><b>Table 3.2. Examples for permission setups</b></p><table summary="Examples for permission setups" border="1"><colgroup><col><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td><td><span class="bold"><strong>Result</strong></span></td></tr><tr><td>All groups</td><td>pagesetter::</td><td>::</td><td>Read</td><td>Read access for all groups to all publications.</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>4::</td><td>None</td><td>Deny access for unregistered users to all publications of
type 4</td></tr><tr><td>Group A</td><td>pagesetter::</td><td>3::</td><td>Edit</td><td>Edit access to publication type 3 for all in group
A</td></tr><tr><td>Group B</td><td>pagesetter::</td><td>2:(1|5|19):</td><td>Edit</td><td>Edit access to publications 1,5 and 19 of type 2 for all in
group B</td></tr><tr><td>My page admin</td><td>pagesetter::</td><td>1::</td><td>Admin</td><td>Admin access for "My page admin" group to publication type
1</td></tr></tbody></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>Remember that the order of the permission
items is significant. PostNuke reads permissions from the top and
downwards until it finds a match. Permission instances are specified with
regular expressions!</div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionstopic"></a>Topic Based Permissions</h2></div></div></div><p>Pagesetter supports topic based access control through the stand-alone
module "TopicAccess" which you can download from <a href="http://www.elfisk.dk" target="_top">
www.elfisk.dk</a>. The TopicAccess module lets the administrator define
read/write access to Pagesetter based on the topic selected for a
publication.</p><p>Topic based permission control follows these rules:</p><div class="itemizedlist"><ul type="disc"><li>Users can only select from those topics they have write access to
when writing a new publication.</li><li>Users can only edit a publication if they have write access to
the topic it is associated with.</li><li>Users can only view a publication if they have read access to
the topic it is associated with.</li></ul></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionssingle"></a>Permissions for Single Publications</h2></div></div></div><p>The way that Pagesetter (and most other modules) uses the permission
system can in some instances make it quite difficult to figure out a way
to grant access to one single publication. For a publication ID
<span class="emphasis"><em>P</em></span> of type <span class="emphasis"><em>T</em></span> you would expect to
be able to match "pagesetter::" and "T:P:" for <span class="emphasis"><em>read</em></span>
and then follow it by a "pagesetter::" and "T::" for
<span class="emphasis"><em>none</em></span>, meaning "grant read access to specific
publication and deny access to the remaining". This could for instance be
a News publication (item 7 og type 1) where you want a specific welcome
message on the front page available for all unregistered users. But you do
not want them to be able to read the rest. For this one would think of the
following:</p><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:7:</td><td>Read</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1::</td><td>None</td></tr></tbody></table></div><p>But this would <span class="emphasis"><em>not</em></span> work! Pagesetter first
checks with an empty publication item for access to the publication type
as a whole. This means it tries to match "pagesetter::" and "1::" before
any thing else. This does not match the first line, so access is denied
even before we check for access to the single item. What you must do
is:</p><div class="table"><a name="id4698430"></a><p class="title"><b>Table 3.3. Permission setup for access to a single publication item.</b></p><table summary="Permission setup for access to a single publication item." border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:7:</td><td>Read</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:.+:</td><td>None</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1::</td><td>Read</td></tr></tbody></table></div><p>The third line ensures access to the publication type as a whole.
The second line denies access to all item specific checks (those with
something in between the colons). The first line grants access to the
specific item.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_editingpubs"></a>Chapter 4. Editing Publications</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#editpubsintro">Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsinformation">Publish information</a></span></dt><dt><span class="section"><a href="#editpubslocation">Location</a></span></dt><dt><span class="section"><a href="#editpubsauthor">Author Information</a></span></dt><dt><span class="section"><a href="#editpubssetting">Setting Editor Defaults</a></span></dt></dl></dd></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="editpubsintro"></a>Editing Publications</h2></div></div></div><p>Instances of a publication type, for instance News items as shown in the
tutorial, are created and edited in the Edit window. This window consists
of two main parts—the publication specific fields, as defined by the
system administrator, and the meta data defined by Pagesetter. The
publication fields part looks somewhat like this:</p><div class="figure"><a name="id4698730"></a><p class="title"><b>Figure 4.1. Editing publications - user data</b></p><div class="mediaobject"><img src="img/pubEditData.jpg" alt="Editing publications - user data"></div></div><p>What you see is three different fields defined by the administrator
of the web site. It is up to you to write whatever you find fitting for
your kind of publication—in this case a News item describing some of
the pleasantries of hiking Bornholm.</p><p>The meta data fields looks like below.</p><div class="figure"><a name="id4698757"></a><p class="title"><b>Figure 4.2. Editing publications - meta data</b></p><div class="mediaobject"><img src="img/pubEditMetaData.jpg" alt="Editing publications - meta data"></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubsinformation"></a>Publish information</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Approval state</span></dt><dd>
The approval state is an information about where the
publication is located in the associated workflow. The possible
states depends on the workflow setup, but the standard workflows
uses states like "Preview" and "Approved" to denote the fact that
the publication is ready for preview (by an editor) or actually
approved by the moderator. The approval state can only be changed by
one of the workflow actions available at the bottom of the
page.
</dd><dt><span class="term">Online setting</span></dt><dd>
This field indicates whether the publication is online or not,
and thereby if it is visible on any of the publication lists or can
be found by searching.
</dd><dt><span class="term">Publish Date</span></dt><dd><p>This setting specifies the first day a publication goes
online. Normally this value is left empty, but you can get Pagesetter
to insert the current date for you. This feature is enabled in the
general configuration section ("Auto fill publish date").</p></dd><dt><span class="term">Expire Date</span></dt><dd><p>This setting specifies the day a publication goes offline (it
will not be available at the specified day).</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubslocation"></a>Location</h3></div></div></div><p>These settings categorizes the publication and defines where to find
it.</p><div class="variablelist"><dl><dt><span class="term">Topic</span></dt><dd><p>The PostNuke topic in which the publication belongs.</p></dd><dt><span class="term">Show in lists</span></dt><dd><p>Specifies whether or not the publication should be shown in
the general list of this publication type. This can be usefull if
you want some publications to be accessible through a menu or
handcrafted URL only.</p></dd><dt><span class="term">Language</span></dt><dd><p>The language in which the publication is written. The
language influences when the publication shows up in the various
lists and menus. The language must match the user's language in
order to show up—or be set to "All".</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubsauthor"></a>Author Information</h3></div></div></div><p>These settings holds who has written the publication and
when.</p><div class="variablelist"><dl><dt><span class="term">Publisher</span></dt><dd><p>The PostNuke user name of the user who created the
publication. This name cannot be changed.</p></dd><dt><span class="term">Author</span></dt><dd><p>The name of the publication author. The creator's real name
is inserted here - but may at any later time be changed to
something else.</p></dd><dt><span class="term">Created</span></dt><dd><p>The date of creation.</p></dd><dt><span class="term">Last updated</span></dt><dd><p>Last updated date.</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubssetting"></a>Setting Editor Defaults</h3></div></div></div><p>It is possible to assign defaults for new publications via the URL
as shown in the <a href="#chap_linking" title="Chapter 6. Linking">linking
chapter</a>.</p></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_pubtypes"></a>Chapter 5. Publication Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#pubtypesstart">Publication Types</a></span></dt><dt><span class="section"><a href="#pubtypesfieldtypes">Field Types</a></span></dt><dd><dl><dt><span class="section"><a href="#id4702522">Upload handling</a></span></dt></dl></dd><dt><span class="section"><a href="#pubtypespubsetup">Publication Setup</a></span></dt><dt><span class="section"><a href="#pubtypescategories">Categories</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypesstart"></a>Publication Types</h2></div></div></div><p>Everything in Pagesetter begins with the declaration of a
<span class="emphasis"><em>publication type</em></span>. The publication type defines the
set of fields that a publication may have, the name of the publication
type, and a bunch of other things.</p><p>Pagesetter comes without any publication types pre-installed, so you
will have to create your own. But a set of output templates for a News
type is supplied—see the <a href="#chap_tutorial" title="Chapter 2. Tutorial">tutorial</a>.</p><p>The publication type setup window looks like this:</p><div class="figure"><a name="id4701203"></a><p class="title"><b>Figure 5.1. Publication type editing.</b></p><div class="mediaobject"><img src="img/pubTypeEdit.jpg" alt="Publication type editing."></div><div class="mediaobject"><img src="img/pubTypeEditFields.jpg" alt="Publication type editing."></div></div><p>The upper part lets you configure various things about the
publication type as a whole. The lower part lets you add one or more
fields to store publication data in. The fields in the upper part
are:</p><div class="variablelist"><dl><dt><span class="term">Publisher</span></dt><dd>
The name of the user who created this publication type.
</dd><dt><span class="term">Title</span></dt><dd>
The name of this publication type.
</dd><dt><span class="term">Template</span></dt><dd>
The template base name for this publication type.
It is used to locate output templates that contains the name as part of the template file name.
For this reason you must select a name that can be used as a file name.
It will default to the publication type title.
</dd><dt><span class="term">Form name</span></dt><dd>
Name of the directory to look into for customized input forms. Leave it empty if you do not expect
to create your own forms. It will default to the publication template value.
See the <a href="#chap_customisation" title="Chapter 13. Customisation">customization chapter</a> for further information.
</dd><dt><span class="term">Description</span></dt><dd>
A short description of the publication type. It is not used for any but a note on this window.
</dd><dt><span class="term">Enable PN-Hooks</span></dt><dd>
Checking this checkbox will force Pagesetter to run it's output through PostNuke's hooks system. This enables commenting, scoring and other hook based features. Unfortunately you cannot specify which hooks to apply.
</dd><dt><span class="term">Workflow</span></dt><dd>
The workflow configuration lets you define how complex a process you need for proof reading and approval of your publications. Pagesetter comes with three predefined workflows: "None", "Standard", and "Enterprise". The "None" workflow has no proofing or anything—publications are simply approved immediately upon submission. The "Standard" workflow is a two-step procedure with a moderator, and the "Enterprise" workflow is a three-step procedure with both editors and moderators. You can read more on workflows in the <a href="#chap_workflows" title="Chapter 12. Workflows">workflow chapter</a>.
</dd><dt><span class="term">Number of publications to show in list</span></dt><dd>
This lets you define how many publications you want to show up when this publication type is displayed on your PostNuke frontpage. It also applies to various blocks used by Pagesetter.
</dd><dt><span class="term">Sorting keys</span></dt><dd>
These lets you define the default sorting order and direction of the publication lists. You must have committed your choice of fields before they are available in the key selections.
</dd><dt><span class="term">Default filter</span></dt><dd>
This is a filter expression to be used when no other filter is supplied on the URL.
For instance "category:eq:5" to display all items with the field "category" set to category item ID 5.
Se <a href="#linkingfiltering" title="Filtering">Filtering</a>.
</dd><dt><span class="term">Default folder</span></dt><dd>To use this field you must first install the "Folder" module separately.
This field indicates where new publications should be located in the folder structure. If you do not select
a folder then Pagesetter won't use the Folder module.</dd><dt><span class="term">Default sub-folder</span></dt><dd><p>To use this field you must first install the "Folder" module separately.
If you want more control over the location of new publications then specify a sub-folder name here. The name
may include references to values in the publication which means you can create sub-folders on the fly by, for
instance, including either topic name, created date or even both in the sub-folder name!</p><p>The syntax is whatever Smarty uses (just like the templates) except that you <span class="emphasis"><em>must</em></span> use curly braces
to indicate Smarty variables. Besides that you can refer to any publication data in exactly the same way
as you would do in a template. The sub-folder name can include slashes to indicate sub-sub-...-sub-folders.
None of the sub-folders need to exist prior to creating a publication.</p><p>Example: to create a sub-folder based on the topic name and current year and month you could write
<code class="filename">{$core.topic.name}/{$core.created|date_format:"%Y/%m"}</code>. In this case you would
get a sub-folder named <code class="filename">Linux/2005/06</code> for a publication created in June 2005.</p></dd><dt><span class="term">Default topic</span></dt><dd>This is the topic which will be assigned to any dynamically created sub-folders.</dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypesfieldtypes"></a>Field Types</h2></div></div></div><p>Each field in a publication must have a type associated with it.
Field types can be any of the following kinds:</p><div class="variablelist"><dl><dt><span class="term">string</span></dt><dd>
A simple text string with no formatting. Text is entered in a one-line input field.
</dd><dt><span class="term">text</span></dt><dd>
A simple text string with no formatting. Text is entered in a multi-line input field.
</dd><dt><span class="term">html</span></dt><dd>
An HTML formatted text input. Text is entered via a what-you-see-is-what-you-get editor (on the Internet Explorer and Mozilla).
</dd><dt><span class="term">bool</span></dt><dd>
A checkbox.
</dd><dt><span class="term">int</span></dt><dd>
Text field with validation for integers.
</dd><dt><span class="term">real</span></dt><dd>
Text field with validation for real numbers.
</dd><dt><span class="term">time</span></dt><dd>
Text field with validation for time (HH:MM).
</dd><dt><span class="term">date</span></dt><dd>
Text field with validation for dates (YYYY-MM-DD). Uses a JavaScript date picker.
</dd><dt><span class="term">User defined category</span></dt><dd>
Dropdown field with the items from the category.
</dd><dt><span class="term">image (url)</span></dt><dd>
The URL to a Photoshare image. The URL may either be entered manually or selected from any of Photoshare's albums.
</dd><dt><span class="term">Image (HTML)</span></dt><dd>The complete HTML for a Photoshare image. The HTML may either be edited manually or
inserted from Photoshare with a popup button.</dd><dt><span class="term">Image upload</span></dt><dd>
Field for uploading an image. Pagesetter automatically generates
thumbnails and download/display links for use in the templates.
</dd><dt><span class="term">Any upload</span></dt><dd>
Field for uploading of any kind of file (also images).
Pagesetter automatically generates download links for use in the templates.
</dd><dt><span class="term">Media (url)</span></dt><dd>
The URL to a multimedia file from Mediashare. The URL may either be entered manually or selected from any of
Mediashare's albums.
</dd><dt><span class="term">E-Mail</span></dt><dd>Text field with validation for E-mails and "mailto:" link in
input formular.</dd><dt><span class="term">Hyperlink</span></dt><dd>Text field with facilities for verifying URL when editing.</dd><dt><span class="term">Currency</span></dt><dd>Text field validation for numbers (identical to "real" but future versions
may add more semantics to this type.</dd><dt><span class="term">Publication</span></dt><dd><p>Dropdown field that allows you to select a publication from a specific
publication type. Can be used to make related publications, like company
departments with related employees. For that example you could use a Publication
field on the employee to select among the different departments, thereby
linking the employee to the department.</p><p>The Publication input requires you to specify what publication type
to choose from. <span class="emphasis"><em>This is done by clicking on the popup button next to the
field type selector.</em></span>. Please read the <a href="#chap_relations" title="Chapter 8. Publication Relations">Relations</a>
chapter for further information.</p></dd><dt><span class="term">Relation</span></dt><dd>A field that allows you to relate different publications to each other. Unlike
the Publication field mentioned above, you can make many-to-many relationships with this
kind of input field. Please read the <a href="#chap_relations" title="Chapter 8. Publication Relations">Relations</a>
chapter for further information.</dd></dl></div><p>Some examples of fields could be a headline (text), some
instructions (html), payment (real), the starting date of some event
(date) and so on. There is no restriction to how many fields you may
choose to use.</p><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="id4702522"></a>Upload handling</h3></div></div></div><p>Upload fields are just, from an abstract point of view, data
fields like all the other ones—you can have as many upload fields you
want in one publication and uploads are also handled correctly by the
revision control system.</p><p>When editing a publication with upload fields, you only need to
upload your files <span class="emphasis"><em>once</em></span>—even when editing and
previewing your input. Any uploaded file is stored temporarily until you
submit your publication, after which the uploaded file is permanently
stored with the publication.</p><p>Uploads are stored as files on the web server and only references
to these files are stored in the upload fields. You must configure the
location of the files in Pagesetter's admin panel (goto
administration::configuration::general). The upload directory must be
writable by the webserver for this to work.</p><p>Uploaded files are accessed via PostNuke's standard <code class="filename">index.php</code>
file and thereby through Pagesetter. This has two implications 1) files
are <span class="emphasis"><em>always</em></span> subject to the same access control as the publication
it is stored with, and 2) data must be streamed through PHP, generating
a performance overhead comparing to linking directly to the files.
<span class="emphasis"><em>It is the developers opinion that complete access control
is more important than performance in this case.</em></span></p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>
You should <span class="emphasis"><em>never</em></span> store your uploads in a directory
accessible through the web server since this makes it possible to
download the files without access control. Unfortunately this cannot
be avoided in some hosting environments, in which case you should name
your upload directory something unguessable.
</div><div class="section" lang="en-US"><div class="titlepage"><div><div><h4 class="title"><a name="id4702591"></a>Changing or deleting upload fields</h4></div></div></div><p>Pagesetter does not automatically delete uploads
associated with a publication type when an upload field is either
changed to another type or deleted.</p><p>Therefore you must manually delete the uploaded files
when you decide they are not in use anymore.</p><p>Uploaded files are named <code class="filename">TxPxRxF.dat</code> where
T is publication type, P is publication ID, R is revision and F
is field name. So if you remove field "document" on publication type 5
then you should delete all files named <code class="filename">5x*document.dat</code>.
</p></div></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypespubsetup"></a>Publication Setup</h2></div></div></div><p>See the <a href="#chap_tutorial" title="Chapter 2. Tutorial">tutorial</a>.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypescategories"></a>Categories</h2></div></div></div><p>It is possible to define categories to be used as dropdown elements
in the input. An example of a category could be a selection of music
media, for instance "CD", "DVD", "Tape", or "LP". A categorization could
also be book genres: "Fiction", "Art", "History", and so on. Categories
can even be nested, so for instance you can define sub-genres for books
"Fiction:Science Fiction" and "Fiction:Fantasy". The categories are
defined in this window:</p><div class="figure"><a name="id4702668"></a><p class="title"><b>Figure 5.2. Editing categories</b></p><div class="mediaobject"><img src="img/listEdit.jpg" alt="Editing categories"></div></div><p>It should be relatively simple; create a new category and then add
the items you want in it. When all is as expected you commit the setup to
the database. The category fields are:</p><div class="variablelist"><dl><dt><span class="term">Title</span></dt><dd>
A displayable value that can be shown to the user.
</dd><dt><span class="term">Value</span></dt><dd>
Any text string for your own use. The value field need not to be used, but can for instance help with sorting or selecting category items.
</dd><dt><span class="term">Description</span></dt><dd>
Help field which can be displayed as extra information about the category. Currently not used, but may in a future version of Pagesetter be used to generate automatic online help.
</dd></dl></div><p>The category can afterwards be used for one or more fields in the
publication types. Just select the category from the field type dropdown
in the publication setup window.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_linking"></a>Chapter 6. Linking</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#linkingintro">Linking</a></span></dt><dt><span class="section"><a href="#linkingsorting">Sorting</a></span></dt><dt><span class="section"><a href="#linkingfiltering">Filtering</a></span></dt><dd><dl><dt><span class="section"><a href="#id4704975">Indirect Operands</a></span></dt></dl></dd><dt><span class="section"><a href="#linkingsettingdefaults">Setting Defaults for Editor</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingsettingtopic">Setting Default Topic</a></span></dt></dl></dd></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingintro"></a>Linking</h2></div></div></div><p>Here is a list of the various Pagesetter URLs you can
use:</p><div class="variablelist"><dl><dt><span class="term">List: .../index.php?module=pagesetter</span></dt><dd>
The basic link used for Pagesetter on the frontpage. This
link shows the Pagesetter default publication list.
</dd><dt><span class="term">List:
.../index.php?module=pagesetter&tid=T&topic=P&lang=L</span></dt><dd>
The same as the above link but with various extra modifiers.
You can specify which publication type you want to show the list
for by setting tid to the type ID. In the same way you can specify
the topic ID as well as language (otherwise the current language
is used to filter the list). All the modifiers are optional and
can be mixed as necessary.
</dd><dt><span class="term">View: .../index.php?module=pagesetter&func=viewpub&tid=T&pid=P</span></dt><dd>
This is the link for viewing a specific publication of a
specific type. You need to set tid to the publication type ID and
pid to the publication ID.
</dd><dt><span class="term">Print:
.../index.php?module=pagesetter&func=printpub&tid=T&pid=P</span></dt><dd>
This is the link for showing a publication as
"printable"—which means without the PostNuke frameset and
with a special template. The tid and pid parameters works as
above.
</dd><dt><span class="term">Edit:
.../index.php?module=pagesetter&func=pubedit&tid=T</span></dt><dd>
This is the link for the creation of a new publication of
the publication type specified in tid. You can use this link for a
"Submit Publication" menu entry like the standard PostNuke "Submit
News" link.
</dd><dt><span class="term">Edit:
.../index.php?module=pagesetter&func=pubedit&tid=T&goback=1</span></dt><dd>
Edit link as above but redirect user to refering page after
edit is completed.
</dd><dt><span class="term">Edit list:
.../index.php?module=pagesetter&func=pubList&tid=T</span></dt><dd>
This is the link for the editor's list of publications and
is used for managing all the publications. As usual the tid
parameter identifies the publication type ID.
</dd><dt><span class="term">Inline display of uploaded file:
.../index.php?module=pagesetter&type=file&func=get&tid=T&pid=P&fid=F</span></dt><dd>
This is the link for inline display of an uploaded file or image. Use T and P for type ID
and publication ID as in the previous examples, and F for the field name of the
upload field. With this URL Pagesetter utilizes the Content-Disposition HTTP header
for marking the data as "inline".
</dd><dt><span class="term">Download of uploaded file:
.../index.php?module=pagesetter&type=file&func=get&tid=T&pid=P&fid=F&download=1</span></dt><dd>
This is the link for download of an uploaded file or image. Use T and P for type ID
and publication ID as in the previous examples, and F for the field name of the
upload field. With this URL Pagesetter utilizes the Content-Disposition HTTP header
for marking the data as "attachment".
</dd></dl></div><p>Here is a short description of the various URL
parameters:</p><div class="variablelist"><dl><dt><span class="term">tid</span></dt><dd>
Publication type ID.
</dd><dt><span class="term">pid</span></dt><dd>
Publication instance ID.
</dd><dt><span class="term">topic</span></dt><dd>
PostNuke topic ID.
</dd><dt><span class="term">lang</span></dt><dd>
PostNuke language ID.
</dd><dt><span class="term">fid</span></dt><dd>
Pagesetter field name for display of uploaded file.
</dd><dt><span class="term">download</span></dt><dd>
Request download of uploaded file instead of displaying it inline.
</dd><dt><span class="term">tpl</span></dt><dd>
Template format for overriding default. Use for instance "tpl=RSS" to access a template
file named <code class="filename">News-RSS.html</code>. The template name "News" is always
derived from the publication type and cannot be changed. If used with a list display
then Pagesetter will look for <code class="filename">News-RSS-header.html</code> and
<code class="filename">News-RSS-footer.html</code> also. If <code class="filename">News-RSS-header.html</code>
cannot be found then <code class="filename">News-RSS.html</code> is assumed to be a
single template list without header/footer.
</dd><dt><span class="term">pubcnt</span></dt><dd>
The number of publications to show on one page. If left out
then the publication type default is used. If set to zero then all
publications are shown.
</dd><dt><span class="term">goback</span></dt><dd>
Used to redirect the user back to refering page after
editing. Set it to 1 to enforce this redirection. If this
parameter is not set the user is redirected to the editors list of
publications.
</dd><dt><span class="term">backurl</span></dt><dd>
Used to redirect the user back to a specific page after
editing. Set it to the complete URL (http://...) to enforce this redirection.
You do not need to set <code class="varname">goback</code> when using <code class="varname">backurl</code>.
</dd></dl></div><p>Here you can see which parameters you can use for the different
functions (with less used functions included):</p><div class="table"><a name="id4702898"></a><p class="title"><b>Table 6.1. URL parameters</b></p><table summary="URL parameters" border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Function</strong></span></td><td><span class="bold"><strong>tid</strong></span></td><td><span class="bold"><strong>pid</strong></span></td><td><span class="bold"><strong>topic</strong></span></td><td><span class="bold"><strong>lang</strong></span></td><td><span class="bold"><strong>tpl</strong></span></td><td><span class="bold"><strong>pubcnt</strong></span></td><td><span class="bold"><strong>Description</strong></span></td></tr><tr><td><span class="emphasis"><em>None</em></span></td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Normal publication list</td></tr><tr><td>viewpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display</td></tr><tr><td>printpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, no frames</td></tr><tr><td>dumppub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, no surrounding html tags</td></tr><tr><td>xmlpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, adds content-type
text/xml</td></tr><tr><td>pubedit</td><td>x</td><td>x</td><td> </td><td> </td><td> </td><td> </td><td>Edit publication</td></tr><tr><td>publist</td><td>x</td><td> </td><td> </td><td> </td><td> </td><td> </td><td>Editor's list of publiations</td></tr><tr><td>printlist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, no frames</td></tr><tr><td>dumplist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, no surrounding html
tags</td></tr><tr><td>xmllist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, adds content-type
text/xml</td></tr></tbody></table></div><p>Here is a list of the templates required for the various
options:</p><div class="table"><a name="id4701989"></a><p class="title"><b>Table 6.2. Template overview by URL function</b></p><table summary="Template overview by URL function" border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Function</strong></span></td><td><span class="bold"><strong>Header / footer</strong></span></td><td><span class="bold"><strong>Def. Template</strong></span></td><td><span class="bold"><strong>Description</strong></span></td></tr><tr><td><span class="emphasis"><em>None</em></span></td><td>x</td><td>list</td><td>Normal publication list</td></tr><tr><td>viewpub</td><td> </td><td>full</td><td>Full publication display</td></tr><tr><td>printpub</td><td> </td><td>print</td><td>Full publication display, no frames</td></tr><tr><td>dumppub</td><td> </td><td>print</td><td>Full publication display, no surrounding html tags</td></tr><tr><td>xmlpub</td><td> </td><td>xml</td><td>Full publication display, adds content-type
text/xml</td></tr><tr><td>pubedit</td><td> </td><td>-</td><td>Edit publication</td></tr><tr><td>publist</td><td> </td><td>-</td><td>Editor's list of publiations</td></tr><tr><td>printlist</td><td>x</td><td>list</td><td>Display list of publications, no frames</td></tr><tr><td>dumplist</td><td>x</td><td>list</td><td>Display list of publications, no surrounding html
tags</td></tr><tr><td>xmllist</td><td>x</td><td>list</td><td>Display list of publications, adds content-type
text/xml</td></tr></tbody></table></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingsorting"></a>Sorting</h2></div></div></div><p>With Pagesetter you can sort the various lists of publications via
restrictions in URL. To do so you specify "orderby=field-list". The list
of fields is separated by commas and you refer to the field names as you
would do in a template. Either as <code class="varname">fieldName</code> or as
<code class="varname">core.fieldName</code>. The default sorting direction is ascending,
but descending can be specified with a ":desc" appended to a field name.</p><div class="example"><a name="id4704482"></a><p class="title"><b>Example 6.1. Ordering by core fields</b></p><div class="variablelist"><dl><dt><span class="term">orderby=core.author,title</span></dt><dd>Order by author and title.</dd><dt><span class="term">orderby=core.hitCount:desc</span></dt><dd>Order by hitCount descending, neat for displaying a "most read
articles" box.</dd></dl></div></div><div class="example"><a name="id4704518"></a><p class="title"><b>Example 6.2. Ordering by category fields and category field properties</b></p><div class="variablelist"><dl><dt><span class="term">orderby=category</span></dt><dd>Order by the sequence defined in the category list.</dd><dt><span class="term">orderby=category.value</span></dt><dd>Order by the value defined in the category list.</dd><dt><span class="term">orderby=category.title</span></dt><dd>Order by the title defined in the category list. </dd><dt><span class="term">orderby=category.fullTitle</span></dt><dd>Order by the full title (e.g. Books:Art:Painting).</dd><dt><span class="term">orderby=category,core.created</span></dt><dd>Order by the sequence defined in the category list and by the date
and time the publication was created.</dd></dl></div></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingfiltering"></a>Filtering</h2></div></div></div><p>It is also possible to filter the various lists of publications via
restrictions in the URL. To add a filter you simply specify "filter=expr" in
the URL where expr is a filter expression. Filter expressions are written
as comma-separated lists of filter terms where each term consists of a
field name, an operator, and an operand separated by colons or hats (^). A single
filter combines all it's expressions using an AND-operator (making it a
conjunction). The possible filter operators are:</p><div class="variablelist"><dl><dt><span class="term">eq</span></dt><dd>
Equal.
</dd><dt><span class="term">ne</span></dt><dd>
Not equal.
</dd><dt><span class="term">lt</span></dt><dd>
Less than.
</dd><dt><span class="term">le</span></dt><dd>
Less than or equal.
</dd><dt><span class="term">gt</span></dt><dd>
Greater than.
</dd><dt><span class="term">ge</span></dt><dd>
Greater than or equal.
</dd><dt><span class="term">like</span></dt><dd>
Using database's LIKE operator to match operand as
'%operand%'.
</dd><dt><span class="term">null</span></dt><dd>
Test for field being NULL. Should be used without an
operand—like filter=FieldName:null.
</dd><dt><span class="term">nottnull</span></dt><dd>
Test for field being NOT NULL. Should be used without an
operand—like filter=FieldName:notnull.
</dd><dt><span class="term">sub</span></dt><dd>
Test for a list field being equal to or an descendant of the
operand. Only valid for category fields.
</dd><dt><span class="term">rel</span></dt><dd>
"Related to"—Test for a relationship field being related to a specific publication item ID.
For instance "department:rel:PID", where <code class="varname">PID</code> is a
publication ID. The "department" field would normally be a field in publication
type T1 (for instance an "Employee", whereas the PID would be from another
publication type T2 (for instance a "Department").
</dd><dt><span class="term">nrel</span></dt><dd>
"Not related to"—The opposite of the "rel" operator (what ever that means).
</dd></dl></div><p>The right hand side operands in a filter expression may contain
"@now" which will expand to the current date. This may although not be
that usefull since there is no support yet for plus or minus
operators.</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>Beware that URL variables are separated with ampersands "&".
Ampersands are therefore also used to separate different filters on the
URL. But multiple filters are OR-ed together <span class="emphasis"><em>which is opposite
the usual interpretation of the ampersand!</em></span></div><p>Multiple filters can be combined on the URL using "filterN=expr"
where N is an integer starting from 1. Multiple filters are combined using
an OR-operator (putting the whole filter language in a disjunctive normal
form).</p><div class="example"><a name="id4704802"></a><p class="title"><b>Example 6.3. Filtering</b></p><div class="variablelist"><dl><dt><span class="term">filter=title:like:pagesetter</span></dt><dd>
Find all the publications where the title field contains the
word "pagesetter".
</dd><dt><span class="term">filter=age:ge:18</span></dt><dd>
Find all the publications where the age field is greater
than or equal to 18.
</dd><dt><span class="term">filter=age:ge:18,country:eq:DK</span></dt><dd>
Find all the publications where the age field is greater
than or equal to 18 and the country is equal to "DK".
</dd><dt><span class="term">filter1=age:ge:18,country:eq:DK&filter2=country:eq:NO</span></dt><dd>
Find all the publications where (1) the age field is greater
than or equal to 18 and the country is equal to "DK", or (2) the
country is equal to "NO".
</dd></dl></div></div><p>Now assume we have a book category as shown in the following image
and use this in a book review publication with a field named "category"
(using the category type of course).</p><div class="figure"><a name="id4704876"></a><p class="title"><b>Figure 6.1. Example categories used for books</b></p><div class="mediaobject"><img src="img/bookGenres.jpg" alt="Example categories used for books"></div></div><p>Then we can select various sub-sets of the reviews with the following
examples.</p><div class="example"><a name="id4704902"></a><p class="title"><b>Example 6.4. Filtering by category fields</b></p><div class="variablelist"><dl><dt><span class="term">filter=category:eq:8</span></dt><dd>
Find all the reviews of category "Fiction"—but not
sub-sets of that. <span class="emphasis"><em>The value to compare with is
the category ID!</em></span>.
</dd><dt><span class="term">filter=category:sub:8</span></dt><dd>
Find all the reviews of category "Fiction" and any sub-sets
of that (Science Fiction and Classics). <span class="emphasis"><em>The value
to compare with is the category ID!</em></span>.
</dd><dt><span class="term">filter1=category:sub:11&filter2=category:eq:23</span></dt><dd>
Find all the art(11) and drinks(23) reviews, but not
non-alcoholic drinks (since we use the eq operator instead of sub
operator). <span class="emphasis"><em>The value to compare with is
the category ID!</em></span>.
</dd></dl></div></div><p>It is furthermore possible to match all items using the special list
value "top", for instance in a filter like
"filter=category:sub:top".</p><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="id4704975"></a>Indirect Operands</h3></div></div></div><p>The above setup is fine as long as you are using hard-coded URLs.
But when you want to let the user enter something in a form and then
filter by that, you need to refer to other URL variables in the filter.
Assume for instance you want to filter a keywords field using the like
operator based on something the user enters in a form. The user input is
entered in a HTML input field named "keyword". Now we can refer to the URL
variable as "$keyword" in a filter like
"filter=keywordField:like:$keyword".</p><div class="figure"><a name="id4704993"></a><p class="title"><b>Figure 6.2. Indirect operands used in input formular</b></p><div class="mediaobject"><img src="img/filter1.jpg" alt="Indirect operands used in input formular"></div></div><p>An example template using this feature could look like this for the
list-header template of a knowledge base:</p><pre class="programlisting"><div class="pn-pagetitle">Knowledge Base</div>
<form action="<!--[pnmodurl modname="pagesetter" tid=$core.tid]-->" method="POST">
<table>
<tr><td>Keyword:</td><td><input type="text" name="keyword"></td><tr>
<tr><td><input type="submit" value="Update"></td><tr>
</table>
<input type="hidden" name="filter"
value="keywordField:like:$keyword">
</form>
<ul></pre></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingsettingdefaults"></a>Setting Defaults for Editor</h2></div></div></div><p>You can assign default values to the editor when creating a new
publication. Simply add "set_xxx=yyy" to the URL and the user defined
variable <code class="varname">xxx</code> will be set to the default value yyy instead of being empty.
Use category ID for category fields. Example: assume you have a News
publication and a Project publication. The News publication can be
categorized by some category. The same goes for your projects. On each
project page you can now add a "Submit Related News" link that presets the
category of the News item to that of the current project. To do so your
Project template must contain something like this:</p><pre class="programlisting"><div class="pn-pagetitle">Projects</div>
...
<a href="<!--[modurl module=pagesetter func=pubedit tid=T
set_category=$category.id]-->">...</a>
...</pre><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="linkingsettingtopic"></a>Setting Default Topic</h3></div></div></div><p>The default topic is, for no really good reason, handled specially. You can set the topic
via the URL variable <code class="varname">topicid</code>. The value must be a topic id.</p></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_templates"></a>Chapter 7. Templates</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#templatesintro">Templates</a></span></dt><dt><span class="section"><a href="#templatesvarstart">Template Variables</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesvarlistitems">Using Categories</a></span></dt><dt><span class="section"><a href="#templatesvarpageable">Using Pageable Fields</a></span></dt><dt><span class="section"><a href="#id4703438">Using upload fields</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesvarhitcounts">Showing Hit Counts</a></span></dt><dt><span class="section"><a href="#templatesvaredit">Showing "Edit This" Link</a></span></dt><dt><span class="section"><a href="#templatessinglemultiplestart">Single and Multiple List Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatessingle">Single Template</a></span></dt><dt><span class="section"><a href="#templatesmultiple">Multiple Templates</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesthemespecific">Theme Specific Templates</a></span></dt><dt><span class="section"><a href="#templatesoperations">Template Operations</a></span></dt><dt><span class="section"><a href="#templatesauto">Auto Generated Templates</a></span></dt><dt><span class="section"><a href="#templatespnrenderplugins">pnRender Plugins</a></span></dt><dt><span class="section"><a href="#templatesrelations">Relating Items to Each Other</a></span></dt><dt><span class="section"><a href="#templatesfolder">Folder Templates</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="templatesintro"></a>Templates</h2></div></div></div><p>The output templating system uses a set of template files for each
publication type and depends on the PostNuke .75 pnRender system (see
installation guide).</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
You can read a lot more about the Smarty templating system (that pnRender
builds on, and thereby Pagesetter) on
<a href="http://smarty.php.net/" target="_top">smarty.php.net</a>.
</div><p>The template files are stored in <code class="filename">pagesetter/pntemplates/...</code>
and they are named after the publication template name
like "<span class="emphasis"><em>template</em></span>-<span class="emphasis"><em>format</em></span>.html" where
<span class="emphasis"><em>template</em></span> is specified in the publication setup and
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator."><meta name="keywords" content="Pagesetter, PostNuke, Publishing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a name="id4482096"></a>Pagesetter 6.3 manual</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Jørn</span> <span class="surname">Wildt</span></h3></div><p class="othercredit"><span class="contrib">DocBook conversion</span>: <span class="firstname">Axel</span> <span class="surname">Guckelsberger</span></p></div></div><div><p class="releaseinfo">Version 6.3-1</p></div><div><p class="copyright">Copyright © 2004 The Pagesetter Development Team</p></div><div><div class="legalnotice"><a name="id4699241"></a><p>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version
1.2 or any later version published by the Free Software Foundation, with
no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A
copy of the license can be obtained from the <a href="http://www.gnu.org/licenses/fdl.txt" target="_top">Free Software
foundation</a></p></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This manual documents how the web publishing tool Pagesetter for PostNuke works. Pagesetter is a publishing
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#chap_introduction">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#introductionstart">Introduction</a></span></dt><dt><span class="section"><a href="#introductionfeatures">Features</a></span></dt><dt><span class="section"><a href="#introductioninstallation">Installation</a></span></dt><dt><span class="section"><a href="#introductionfolder">Organizing Publications</a></span></dt><dt><span class="section"><a href="#introductionprinting">Printing This Manual</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_tutorial">2. Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="#tutstart">Tutorial</a></span></dt><dt><span class="section"><a href="#tutcreatinst">Creating a Publication Instance</a></span></dt><dt><span class="section"><a href="#tuttemplates">Templates</a></span></dt><dt><span class="section"><a href="#tutfrontpage">Putting the News on the Frontpage</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_permissions">3. Permissions</a></span></dt><dd><dl><dt><span class="section"><a href="#permissionsintro">Permissions</a></span></dt><dt><span class="section"><a href="#permissionstopic">Topic Based Permissions</a></span></dt><dt><span class="section"><a href="#permissionssingle">Permissions for Single Publications</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_editingpubs">4. Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsintro">Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsinformation">Publish information</a></span></dt><dt><span class="section"><a href="#editpubslocation">Location</a></span></dt><dt><span class="section"><a href="#editpubsauthor">Author Information</a></span></dt><dt><span class="section"><a href="#editpubssetting">Setting Editor Defaults</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_pubtypes">5. Publication Types</a></span></dt><dd><dl><dt><span class="section"><a href="#pubtypesstart">Publication Types</a></span></dt><dt><span class="section"><a href="#pubtypesfieldtypes">Field Types</a></span></dt><dd><dl><dt><span class="section"><a href="#id4702522">Upload handling</a></span></dt></dl></dd><dt><span class="section"><a href="#pubtypespubsetup">Publication Setup</a></span></dt><dt><span class="section"><a href="#pubtypescategories">Categories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_linking">6. Linking</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingintro">Linking</a></span></dt><dt><span class="section"><a href="#linkingsorting">Sorting</a></span></dt><dt><span class="section"><a href="#linkingfiltering">Filtering</a></span></dt><dd><dl><dt><span class="section"><a href="#id4704975">Indirect Operands</a></span></dt></dl></dd><dt><span class="section"><a href="#linkingsettingdefaults">Setting Defaults for Editor</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingsettingtopic">Setting Default Topic</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_templates">7. Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesintro">Templates</a></span></dt><dt><span class="section"><a href="#templatesvarstart">Template Variables</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesvarlistitems">Using Categories</a></span></dt><dt><span class="section"><a href="#templatesvarpageable">Using Pageable Fields</a></span></dt><dt><span class="section"><a href="#id4703438">Using upload fields</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesvarhitcounts">Showing Hit Counts</a></span></dt><dt><span class="section"><a href="#templatesvaredit">Showing "Edit This" Link</a></span></dt><dt><span class="section"><a href="#templatessinglemultiplestart">Single and Multiple List Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatessingle">Single Template</a></span></dt><dt><span class="section"><a href="#templatesmultiple">Multiple Templates</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesthemespecific">Theme Specific Templates</a></span></dt><dt><span class="section"><a href="#templatesoperations">Template Operations</a></span></dt><dt><span class="section"><a href="#templatesauto">Auto Generated Templates</a></span></dt><dt><span class="section"><a href="#templatespnrenderplugins">pnRender Plugins</a></span></dt><dt><span class="section"><a href="#templatesrelations">Relating Items to Each Other</a></span></dt><dt><span class="section"><a href="#templatesfolder">Folder Templates</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_relations">8. Publication Relations</a></span></dt><dd><dl><dt><span class="section"><a href="#relationsintro"></a></span></dt><dt><span class="section"><a href="#relationspublication">Parent-Child Relations—The Publication Field</a></span></dt><dt><span class="section"><a href="#relationsrelation">Relating to multiple publication instances</a></span></dt><dt><span class="section"><a href="#relationsbrief">Some pitfalls concerning the relationship feature</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_postnukefeatures">9. PostNuke Features</a></span></dt><dd><dl><dt><span class="section"><a href="#pnfeatureswaiting">Waiting Block</a></span></dt><dt><span class="section"><a href="#pnfeatureslistblock">List Block</a></span></dt><dt><span class="section"><a href="#pnfeaturesoldstories">Old Stories Block</a></span></dt><dt><span class="section"><a href="#pnfeaturespubblock">Publication Block</a></span></dt><dt><span class="section"><a href="#pnfeaturesrandomblock">Random Publication Block</a></span></dt><dt><span class="section"><a href="#pnfeaturescatbased">Category Based Menu Block</a></span></dt><dt><span class="section"><a href="#pnfeatureshooks">PostNuke Hooks</a></span></dt><dt><span class="section"><a href="#pnfeaturessearch">PostNuke Searching</a></span></dt><dt><span class="section"><a href="#pnfeaturesshorturls">Short URLs</a></span></dt><dt><span class="section"><a href="#pnfeaturescaching">Caching in pnRender</a></span></dt><dt><span class="section"><a href="#pnfeaturesfolder">Organizing Publications</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_extrafeatures">10. Extra Features</a></span></dt><dd><dl><dt><span class="section"><a href="#extrafeaturesrssfeeds">RSS Feeds</a></span></dt><dt><span class="section"><a href="#extrafeaturestitlehack">Title-Hack</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeproc">FEProc Integration</a></span></dt><dd><dl><dt><span class="section"><a href="#extrafeaturesfeprocstart">FEProc Integration</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeprochandler">Pagesetter FEProc Handler</a></span></dt><dt><span class="section"><a href="#extrafeaturesfeexample">Example - An Event Registration Setup</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#chap_extratools">11. Extra Tools</a></span></dt><dd><dl><dt><span class="section"><a href="#extraimport">Importing Data</a></span></dt><dd><dl><dt><span class="section"><a href="#importnews">Importing From PostNuke News</a></span></dt><dt><span class="section"><a href="#extraimportce">Importing From ContentExpress</a></span></dt><dt><span class="section"><a href="#extraimportpc">Importing From PostCalendar</a></span></dt><dt><span class="section"><a href="#extraimporting">Importing Pagesetter Publication Types</a></span></dt></dl></dd><dt><span class="section"><a href="#extraexporting">Exporting Pagesetter Publication Types</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_workflows">12. Workflows</a></span></dt><dd><dl><dt><span class="section"><a href="#wfdefinition">Definition</a></span></dt><dt><span class="section"><a href="#wfstandardwfstart">Standard workflows</a></span></dt></dl></dd><dt><span class="chapter"><a href="#chap_customisation">13. Customisation</a></span></dt><dd><dl><dt><span class="section"><a href="#custcss">Style Sheets</a></span></dt><dt><span class="section"><a href="#custinputforms">Input Forms Layout</a></span></dt><dt><span class="section"><a href="#customplugin">Input plugins</a></span></dt><dt><span class="section"><a href="#custhtmlarea">HTMLArea Editor</a></span></dt><dt><span class="section"><a href="#id4707674">Internal templates</a></span></dt><dt><span class="section"><a href="#custpostsubmit">Post Submit Handler</a></span></dt></dl></dd><dt><span class="part"><a href="#appendix">I. Appendix</a></span></dt><dd><dl><dt><span class="appendix"><a href="#chap_credits">A. Useful Hints</a></span></dt><dt><span class="appendix"><a href="#chap_credits">B. Credits</a></span></dt><dt><span class="appendix"><a href="#gfdl">C. GNU Free Documentation License</a></span></dt><dd><dl><dt><span class="section"><a href="#gfdl-0">PREAMBLE</a></span></dt><dt><span class="section"><a href="#gfdl-1">APPLICABILITY AND DEFINITIONS</a></span></dt><dt><span class="section"><a href="#gfdl-2">VERBATIM COPYING</a></span></dt><dt><span class="section"><a href="#gfdl-3">COPYING IN QUANTITY</a></span></dt><dt><span class="section"><a href="#gfdl-4">MODIFICATIONS</a></span></dt><dt><span class="section"><a href="#gfdl-5">COMBINING DOCUMENTS</a></span></dt><dt><span class="section"><a href="#gfdl-6">COLLECTIONS OF DOCUMENTS</a></span></dt><dt><span class="section"><a href="#gfdl-7">AGGREGATION WITH INDEPENDENT WORKS</a></span></dt><dt><span class="section"><a href="#gfdl-8">TRANSLATION</a></span></dt><dt><span class="section"><a href="#gfdl-9">TERMINATION</a></span></dt><dt><span class="section"><a href="#gfdl-10">FUTURE REVISIONS OF THIS LICENSE</a></span></dt><dt><span class="section"><a href="#gfdl-addendum">ADDENDUM: How to use this License for
your documents</a></span></dt></dl></dd></dl></dd></dl></div><div class="list-of-figures"><p><b>List of Figures</b></p><dl><dt>1.1. <a href="#id4698997">Screenshot illustrating a News item constructed with Pagesetter</a></dt><dt>4.1. <a href="#id4698730">Editing publications - user data</a></dt><dt>4.2. <a href="#id4698757">Editing publications - meta data</a></dt><dt>5.1. <a href="#id4701203">Publication type editing.</a></dt><dt>5.2. <a href="#id4702668">Editing categories</a></dt><dt>6.1. <a href="#id4704876">Example categories used for books</a></dt><dt>6.2. <a href="#id4704993">Indirect operands used in input formular</a></dt><dt>9.1. <a href="#id4706572">Example menu block based on a category setup</a></dt><dt>11.1. <a href="#id4699705">Various import tools.</a></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#id4700275">Permission levels</a></dt><dt>3.2. <a href="#id4700516">Examples for permission setups</a></dt><dt>3.3. <a href="#id4698430">Permission setup for access to a single publication item.</a></dt><dt>6.1. <a href="#id4702898">URL parameters</a></dt><dt>6.2. <a href="#id4701989">Template overview by URL function</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="#id4700041">Example template for News item.</a></dt><dt>6.1. <a href="#id4704482">Ordering by core fields</a></dt><dt>6.2. <a href="#id4704518">Ordering by category fields and category field properties</a></dt><dt>6.3. <a href="#id4704802">Filtering</a></dt><dt>6.4. <a href="#id4704902">Filtering by category fields</a></dt><dt>7.1. <a href="#id4703514">Example template with upload field (named "document").</a></dt><dt>7.2. <a href="#id4706217">Relating items by topic.</a></dt><dt>7.3. <a href="#id4706242">Parent/child relations.</a></dt><dt>7.4. <a href="#templatemanytomanyexample">Many-to-Many relations.</a></dt><dt>9.1. <a href="#id4705313">Example of search form taken from the standard PostNukeSilver theme.</a></dt><dt>13.1. <a href="#id4707660">Adding a CSS class selector to HTMLArea's right-click
context menu.</a></dt></dl></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_introduction"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#introductionstart">Introduction</a></span></dt><dt><span class="section"><a href="#introductionfeatures">Features</a></span></dt><dt><span class="section"><a href="#introductioninstallation">Installation</a></span></dt><dt><span class="section"><a href="#introductionfolder">Organizing Publications</a></span></dt><dt><span class="section"><a href="#introductionprinting">Printing This Manual</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionstart"></a>Introduction</h2></div></div></div><p>Pagesetter is a publishing
module that allows the PostNuke users to create web pages from structured data, with the data structure
and output templates defined by the PostNuke administrator. The goal is
ultimately to be able to define all the kinds of publications that
normally require different PostNuke modules. The list includes:</p><div class="itemizedlist"><ul type="disc"><li><span class="emphasis"><em>News</em></span> items with a headline, teaser text,
news text, and an associated image.
</li><li><span class="emphasis"><em>FAQ</em></span> items consisting of a question and an
answer.
</li><li><span class="emphasis"><em>Recipes</em></span> with a title, a list of
ingredients, and instructions.
</li><li><span class="emphasis"><em>Task lists</em></span></li><li><span class="emphasis"><em>Course descriptions</em></span></li><li><span class="emphasis"><em>Music collections</em></span></li><li><p>… and so on.</p></li></ul></div><div class="figure"><a name="id4698997"></a><p class="title"><b>Figure 1.1. Screenshot illustrating a News item constructed with Pagesetter</b></p><div class="mediaobject"><img src="img/pubTemplate.jpg" alt="Screenshot illustrating a News item constructed with Pagesetter"></div></div><p>See the <code class="filename">readme.txt</code> for installation instructions.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionfeatures"></a>Features</h2></div></div></div><div class="itemizedlist"><ul type="disc"><li>
User defined publication types with a variable number of input
fields of many different kinds.
</li><li>
Templatable output lets the adminstrator layout the publications
in almost any way he want using PostNuke's pnRender system.
</li><li>
The what-you-see-is-what-you-get (WYSIWYG) editor htmlArea
simplifies input—no need for knowing HTML codes.
</li><li>
Multiple nested categories can be created and used for input fields.
</li><li>
Multi-page entries.
</li><li>
Flexible workflow system with plugins to extend it.
</li><li>
Revision control—Pagesetter stores the complete history of
all changes to any publication.
</li><li>
File uploads can be associated with all publications. With this
feature you can design your own document management system,
complete with workflows and revision control, or just upload
images with your News items.
</li><li>
Dates can be selected with a built-in date picker.
</li><li>
Top performance with cached output.
</li><li>
Two level approval control of publishing.
</li><li>
Publications can be timed with a start and end date.
</li><li>
PostNuke homepage can be set to show any list of publications
you want.
</li><li>
Pagesetter is PostNuke hooks compatible which means you can
enable comments, scoring, Auto-links and many other features with just
a few clicks.
</li></ul></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductioninstallation"></a>Installation</h2></div></div></div><p>Please read the "install.txt" file for instructions.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionfolder"></a>Organizing Publications</h2></div></div></div><p>Pagesetter publications can be organized in a folder structure with the
help of another module "Folder" from www.elfisk.dk. Without this module you
can browse through linear lists of publications with Pagesetter itself.</p><a href="#pnfeaturesfolder" title="Organizing Publications">Read more in the PostNuke Features chapter</a>.
</div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introductionprinting"></a>Printing This Manual</h2></div></div></div><p>The CSS styles in the HTML version has been carefully selected to generate
a nicely formatted printout. This has although only been tested on the
Internet Explorer 6.0. If you choose to print the manual then please
remember to set the paper format to A4 portrait. You should have left and
right margins set to 5mm.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_tutorial"></a>Chapter 2. Tutorial</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#tutstart">Tutorial</a></span></dt><dt><span class="section"><a href="#tutcreatinst">Creating a Publication Instance</a></span></dt><dt><span class="section"><a href="#tuttemplates">Templates</a></span></dt><dt><span class="section"><a href="#tutfrontpage">Putting the News on the Frontpage</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutstart"></a>Tutorial</h2></div></div></div><p>Let us start with a quick tutorial showing how to setup your very
first Pagesetter publication. For this we use a News type as an example.
With this publication type we will be able to write News with a title,
a short header, full text, and an associated image selected from Mediashare</p><p>Make sure you have admin rights on your PostNuke site and then goto
the Pagesetter administration page. Here you will see a list of
publication types. It should look like this:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeList.jpg"></div></div><p>Pagesetter has, as you can see, created a PN-News publication type
for you already. You can ignore this or use it as a reference for this tutorial.
When you are finished with the tutorial you should have a publication type more or
less identical to the predefined.</p><p>Now click "New Publication Type" which will bring you to this
window where you give a name to your new publication type and then create it:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate1.jpg"></div></div><p>Click "Next" which will bring you to the window below where you can start adding
the input fields you want for your publication type:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate2.jpg"></div></div><p>Use the green and red +/- symbols to add and delete fields. Make
sure you name everything exactly as you see it in the image (description
text is unimportant).</p><div class="itemizedlist"><ul type="disc"><li>The <span class="emphasis"><em>title</em></span> radio button indicates which field to
use as title field in the various Pagesetter lists.</li><li>The <span class="emphasis"><em>mandatory (M)</em></span> checkbox indicates that the user
<span class="emphasis"><em>must</em></span> enter something in the data field.</li><li>The <span class="emphasis"><em>Searchable (S)</em></span>
checkbox selectes which fields to use when searching for something on your
website.</li><li>The <span class="emphasis"><em>multiple
pages (MP)</em></span> checkbox allows you to define which field the user may
insert page breaks in. <span class="emphasis"><em>Only one field may be selected for
multiple pages, but none need to be so.</em></span> Page breaks can be
inserted using the editor button for it or inserted manually with a <hr
class="pagebreak"/> tag. The templating system then ensures the field
is split into pages separated by that tag.</li></ul></div><p>Click "Next" again and you will get to the last screen where you can select which
templates you want to create:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeCreate3.jpg"></div></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3>UNCHECK ALL TEMPLATE CHECKBOXES (for this tutorial)!
Otherwise the nice default PN-News templates will be overwritten with boring autocreated
ones!</div><p>The "List Setup" settings
specify sorting order and such like for this publication type when an
overview is requested—for instance when Pagesetter is chosen as the
frontpage module in PostNuke's admin settings. The sequence of the fields
does also define the sequence in which they are presented when creating a
new publication instance. Now you are ready to submit the publication type
to the database. Press "Commit" and you are done.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutcreatinst"></a>Creating a Publication Instance</h2></div></div></div><p>Now that we have a publication type available (News) we should start
publishing something. Select the "New" link in the publication types
window:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubTypeList_new.jpg"></div></div><p>This will bring you to the "Publication Edit" window:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubEditData.jpg"></div></div><p>Entering the text should be straight forward. The image URL can be
selected from Mediashare (if installed) by clicking the "..." button. Now
press "Save" and you are done and will be brought to the publication
list:</p><div class="informalfigure"><div class="mediaobject"><img src="img/pubList.jpg"></div></div><p>If you have named all your fields correctly then you should be able
to view your new publication through the pre-installed templates. Click
the <span class="emphasis"><em>view</em></span> action and you should see:</p><div class="informalfigure"><div class="mediaobject"><img src="img/publication.jpg"></div></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>You must enable images (with attributes!) and other HTML tags in PostNuke's setup
before you can display any images. If you forget this then you will only see the text "<img ...>"
instead of the actual image.</p><p>You must also enable popups for your site if you have any popup blockers installed, otherwise
HTMLArea and previewing won't work.</p><p>You must also have EZComments installed to get the News example running with the
templates in the examples directory.</p></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tuttemplates"></a>Templates</h2></div></div></div><p>The template used to display your data is named
<code class="filename">PN-News-full.html</code> and is located in the <code class="filename">pntemplates</code>
directory. As you can see the name consists of the
publication name concatenated with a dash and a template format name (in
this case "full"). If you open the file you will see something
like:</p><div class="example"><a name="id4700041"></a><p class="title"><b>Example 2.1. Example template for News item.</b></p><pre class="programlisting">
// (the html presented is not the most correct with respect
// to accessibility and xhtml compliancy)
<div style="width: 500px;">
<div class="pn-title"><!--[$title]--></div>
<div class="pn-sub">By: <!--[$core.author]-->
(<!--[$core.creator]-->)
<!--[$core.lastUpdated|date_format:"%Y.%m.%d"]--></div><p>
<table>
<tr>
<td valign="top">
<!--[$text[$core.page]]--><br>
<!--[if $core.pageCount > 1 ]-->
Page: <!--[pagesetter_pager]-->
<!--[/if]-->
</td>
<td valign="top">
<!--[if $image != "" ]-->
<img src="<!--[$image]-->" width="200"
alt="<!--[$imagetext]-->"
title="<!--[$imagetext]-->"><br>
<i><!--[$imagetext]--></i>
<!--[/if]-->
</td>
</tr>
</table>
<p>
<table width="100%"><tr>
<td><!--[$core.printThis]--> | <!--[$core.sendThis]-->
| Hits: <!--[nocache]--><!--[$core.hitCount]--><!--[/nocache]-->
| <!--[nocache]--><!--[$core.editInfo]--><!--[/nocache]--></td>
<!--[if $core.pageCount > 1 ]-->
<td align="right">(Page <!--[$core.page+1]-->
of <!--[$core.pageCount]-->)</td>
<!--[/if]-->
</tr></table>
</div></pre></div><p>The <!--[ ]--> HTML
comments contain code for the pnRender templating system. Basically you
can put $fieldName into them to show your publication fields, but more
complex stuff like switching statements and for-loops can be added too.
The variable name $core is predefined by Pagesetter and contains core
information about the publication like author and creation date.
<span class="emphasis"><em>Do not edit the template directly. Copy it instead to a theme
specific template and put it into your themes directory as described in
the template chapter.</em></span> Read more about templates in the <a href="#chap_templates" title="Chapter 7. Templates">Template chapter</a>.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutfrontpage"></a>Putting the News on the Frontpage</h2></div></div></div><p>If you want to show your News items on the frontpage of your
PostNuke installation, you need to find the admin section of PostNuke and
then go into the settings section. Here you find a dropdown somewhere
where you can select Pagesetter as the frontpage module. But before that
you need to tell Pagesetter which publication type to show on the
frontpage. Go to the general settings of Pagesetter:</p><div class="informalfigure"><div class="mediaobject"><img src="img/menuGeneral.jpg"></div></div><p>and select the News publication type for the frontpage:</p><div class="informalfigure"><div class="mediaobject"><img src="img/configuration.jpg"></div></div><p>If everything goes as expected you should be able to see the News
list on the frontpage (thanks to <a href="http://www.postnuke.dk" target="_top">www.postnuke.dk</a> for design
inspiration):</p><div class="informalfigure"><div class="mediaobject"><img src="img/publications.jpg"></div></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_permissions"></a>Chapter 3. Permissions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#permissionsintro">Permissions</a></span></dt><dt><span class="section"><a href="#permissionstopic">Topic Based Permissions</a></span></dt><dt><span class="section"><a href="#permissionssingle">Permissions for Single Publications</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionsintro"></a>Permissions</h2></div></div></div><p>Pagesetter works with five different access levels:</p><div class="variablelist"><dl><dt><span class="term">Readers</span></dt><dd>
Users who are allowed to read Pagesetter
publications.
</dd><dt><span class="term">Authors</span></dt><dd>
Users who are allowed to submit new publications but do not
have access to the list of existing publications.
</dd><dt><span class="term">Editors</span></dt><dd>
Users who are allowed to submit new publications and have
access to the list of publications.
</dd><dt><span class="term">Moderators</span></dt><dd>
Users who are allowed to submit and delete publications, as
well as moving them back and forth to the depot.
</dd><dt><span class="term">Administrators</span></dt><dd>
Users who are allowed to create new publication types as
well as performing other administrative Pagesetter tasks.
</dd></dl></div><p>On top of the raw PostNuke
permission system, Pagesetter adds it's own <span class="emphasis"><em>workflow</em></span> system.
Through this it is possible to specify who has access to what and when.
The workflow system is able to handle such diverse setups as a <a href="http://en.wikipedia.org/wiki/Wiki" target="_top">Wiki</a> framework (well,
something that simulates it to a certain degree) and an enteprise level
workflow with authors, editors and moderators. Read more in the <a href="#chap_workflows" title="Chapter 12. Workflows">workflow chapter</a>.</p><p>The Pagesetter permission levels are mapped into the PostNuke
permissions like this:</p><div class="table"><a name="id4700275"></a><p class="title"><b>Table 3.1. Permission levels</b></p><table summary="Permission levels" border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>readers</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Read</td></tr><tr><td>authors</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Edit</td></tr><tr><td>editors</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Add</td></tr><tr><td>moderators</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Delete</td></tr><tr><td>admins</td><td>pagesetter::</td><td><span class="emphasis"><em>tid:pid:</em></span></td><td>Admin</td></tr></tbody></table></div><p>In the table <span class="emphasis"><em>tid</em></span> is used as the publication
type ID and <span class="emphasis"><em>pid</em></span> as the publication (instance) ID. You
can use these to give access to specific subsets of the publications. The
special instance is '::' which matches <span class="emphasis"><em>both</em></span> all
publications <span class="emphasis"><em>and</em></span> the generic test for access to the
Pagesetter module. Here is a few examples:</p><div class="table"><a name="id4700516"></a><p class="title"><b>Table 3.2. Examples for permission setups</b></p><table summary="Examples for permission setups" border="1"><colgroup><col><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td><td><span class="bold"><strong>Result</strong></span></td></tr><tr><td>All groups</td><td>pagesetter::</td><td>::</td><td>Read</td><td>Read access for all groups to all publications.</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>4::</td><td>None</td><td>Deny access for unregistered users to all publications of
type 4</td></tr><tr><td>Group A</td><td>pagesetter::</td><td>3::</td><td>Edit</td><td>Edit access to publication type 3 for all in group
A</td></tr><tr><td>Group B</td><td>pagesetter::</td><td>2:(1|5|19):</td><td>Edit</td><td>Edit access to publications 1,5 and 19 of type 2 for all in
group B</td></tr><tr><td>My page admin</td><td>pagesetter::</td><td>1::</td><td>Admin</td><td>Admin access for "My page admin" group to publication type
1</td></tr></tbody></table></div><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>Remember that the order of the permission
items is significant. PostNuke reads permissions from the top and
downwards until it finds a match. Permission instances are specified with
regular expressions!</div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionstopic"></a>Topic Based Permissions</h2></div></div></div><p>Pagesetter supports topic based access control through the stand-alone
module "TopicAccess" which you can download from <a href="http://www.elfisk.dk" target="_top">
www.elfisk.dk</a>. The TopicAccess module lets the administrator define
read/write access to Pagesetter based on the topic selected for a
publication.</p><p>Topic based permission control follows these rules:</p><div class="itemizedlist"><ul type="disc"><li>Users can only select from those topics they have write access to
when writing a new publication.</li><li>Users can only edit a publication if they have write access to
the topic it is associated with.</li><li>Users can only view a publication if they have read access to
the topic it is associated with.</li></ul></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="permissionssingle"></a>Permissions for Single Publications</h2></div></div></div><p>The way that Pagesetter (and most other modules) uses the permission
system can in some instances make it quite difficult to figure out a way
to grant access to one single publication. For a publication ID
<span class="emphasis"><em>P</em></span> of type <span class="emphasis"><em>T</em></span> you would expect to
be able to match "pagesetter::" and "T:P:" for <span class="emphasis"><em>read</em></span>
and then follow it by a "pagesetter::" and "T::" for
<span class="emphasis"><em>none</em></span>, meaning "grant read access to specific
publication and deny access to the remaining". This could for instance be
a News publication (item 7 og type 1) where you want a specific welcome
message on the front page available for all unregistered users. But you do
not want them to be able to read the rest. For this one would think of the
following:</p><div class="informaltable"><table border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:7:</td><td>Read</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1::</td><td>None</td></tr></tbody></table></div><p>But this would <span class="emphasis"><em>not</em></span> work! Pagesetter first
checks with an empty publication item for access to the publication type
as a whole. This means it tries to match "pagesetter::" and "1::" before
any thing else. This does not match the first line, so access is denied
even before we check for access to the single item. What you must do
is:</p><div class="table"><a name="id4698430"></a><p class="title"><b>Table 3.3. Permission setup for access to a single publication item.</b></p><table summary="Permission setup for access to a single publication item." border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Group</strong></span></td><td><span class="bold"><strong>Component</strong></span></td><td><span class="bold"><strong>Instance</strong></span></td><td><span class="bold"><strong>Permission</strong></span></td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:7:</td><td>Read</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1:.+:</td><td>None</td></tr><tr><td>Unregistered</td><td>pagesetter::</td><td>1::</td><td>Read</td></tr></tbody></table></div><p>The third line ensures access to the publication type as a whole.
The second line denies access to all item specific checks (those with
something in between the colons). The first line grants access to the
specific item.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_editingpubs"></a>Chapter 4. Editing Publications</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#editpubsintro">Editing Publications</a></span></dt><dd><dl><dt><span class="section"><a href="#editpubsinformation">Publish information</a></span></dt><dt><span class="section"><a href="#editpubslocation">Location</a></span></dt><dt><span class="section"><a href="#editpubsauthor">Author Information</a></span></dt><dt><span class="section"><a href="#editpubssetting">Setting Editor Defaults</a></span></dt></dl></dd></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="editpubsintro"></a>Editing Publications</h2></div></div></div><p>Instances of a publication type, for instance News items as shown in the
tutorial, are created and edited in the Edit window. This window consists
of two main parts—the publication specific fields, as defined by the
system administrator, and the meta data defined by Pagesetter. The
publication fields part looks somewhat like this:</p><div class="figure"><a name="id4698730"></a><p class="title"><b>Figure 4.1. Editing publications - user data</b></p><div class="mediaobject"><img src="img/pubEditData.jpg" alt="Editing publications - user data"></div></div><p>What you see is three different fields defined by the administrator
of the web site. It is up to you to write whatever you find fitting for
your kind of publication—in this case a News item describing some of
the pleasantries of hiking Bornholm.</p><p>The meta data fields looks like below.</p><div class="figure"><a name="id4698757"></a><p class="title"><b>Figure 4.2. Editing publications - meta data</b></p><div class="mediaobject"><img src="img/pubEditMetaData.jpg" alt="Editing publications - meta data"></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubsinformation"></a>Publish information</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Approval state</span></dt><dd>
The approval state is an information about where the
publication is located in the associated workflow. The possible
states depends on the workflow setup, but the standard workflows
uses states like "Preview" and "Approved" to denote the fact that
the publication is ready for preview (by an editor) or actually
approved by the moderator. The approval state can only be changed by
one of the workflow actions available at the bottom of the
page.
</dd><dt><span class="term">Online setting</span></dt><dd>
This field indicates whether the publication is online or not,
and thereby if it is visible on any of the publication lists or can
be found by searching.
</dd><dt><span class="term">Publish Date</span></dt><dd><p>This setting specifies the first day a publication goes
online. Normally this value is left empty, but you can get Pagesetter
to insert the current date for you. This feature is enabled in the
general configuration section ("Auto fill publish date").</p></dd><dt><span class="term">Expire Date</span></dt><dd><p>This setting specifies the day a publication goes offline (it
will not be available at the specified day).</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubslocation"></a>Location</h3></div></div></div><p>These settings categorizes the publication and defines where to find
it.</p><div class="variablelist"><dl><dt><span class="term">Topic</span></dt><dd><p>The PostNuke topic in which the publication belongs.</p></dd><dt><span class="term">Show in lists</span></dt><dd><p>Specifies whether or not the publication should be shown in
the general list of this publication type. This can be usefull if
you want some publications to be accessible through a menu or
handcrafted URL only.</p></dd><dt><span class="term">Language</span></dt><dd><p>The language in which the publication is written. The
language influences when the publication shows up in the various
lists and menus. The language must match the user's language in
order to show up—or be set to "All".</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubsauthor"></a>Author Information</h3></div></div></div><p>These settings holds who has written the publication and
when.</p><div class="variablelist"><dl><dt><span class="term">Publisher</span></dt><dd><p>The PostNuke user name of the user who created the
publication. This name cannot be changed.</p></dd><dt><span class="term">Author</span></dt><dd><p>The name of the publication author. The creator's real name
is inserted here - but may at any later time be changed to
something else.</p></dd><dt><span class="term">Created</span></dt><dd><p>The date of creation.</p></dd><dt><span class="term">Last updated</span></dt><dd><p>Last updated date.</p></dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="editpubssetting"></a>Setting Editor Defaults</h3></div></div></div><p>It is possible to assign defaults for new publications via the URL
as shown in the <a href="#chap_linking" title="Chapter 6. Linking">linking
chapter</a>.</p></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_pubtypes"></a>Chapter 5. Publication Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#pubtypesstart">Publication Types</a></span></dt><dt><span class="section"><a href="#pubtypesfieldtypes">Field Types</a></span></dt><dd><dl><dt><span class="section"><a href="#id4702522">Upload handling</a></span></dt></dl></dd><dt><span class="section"><a href="#pubtypespubsetup">Publication Setup</a></span></dt><dt><span class="section"><a href="#pubtypescategories">Categories</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypesstart"></a>Publication Types</h2></div></div></div><p>Everything in Pagesetter begins with the declaration of a
<span class="emphasis"><em>publication type</em></span>. The publication type defines the
set of fields that a publication may have, the name of the publication
type, and a bunch of other things.</p><p>Pagesetter comes without any publication types pre-installed, so you
will have to create your own. But a set of output templates for a News
type is supplied—see the <a href="#chap_tutorial" title="Chapter 2. Tutorial">tutorial</a>.</p><p>The publication type setup window looks like this:</p><div class="figure"><a name="id4701203"></a><p class="title"><b>Figure 5.1. Publication type editing.</b></p><div class="mediaobject"><img src="img/pubTypeEdit.jpg" alt="Publication type editing."></div><div class="mediaobject"><img src="img/pubTypeEditFields.jpg" alt="Publication type editing."></div></div><p>The upper part lets you configure various things about the
publication type as a whole. The lower part lets you add one or more
fields to store publication data in. The fields in the upper part
are:</p><div class="variablelist"><dl><dt><span class="term">Publisher</span></dt><dd>
The name of the user who created this publication type.
</dd><dt><span class="term">Title</span></dt><dd>
The name of this publication type.
</dd><dt><span class="term">Template</span></dt><dd>
The template base name for this publication type.
It is used to locate output templates that contains the name as part of the template file name.
For this reason you must select a name that can be used as a file name.
It will default to the publication type title.
</dd><dt><span class="term">Form name</span></dt><dd>
Name of the directory to look into for customized input forms. Leave it empty if you do not expect
to create your own forms. It will default to the publication template value.
See the <a href="#chap_customisation" title="Chapter 13. Customisation">customization chapter</a> for further information.
</dd><dt><span class="term">Description</span></dt><dd>
A short description of the publication type. It is not used for any but a note on this window.
</dd><dt><span class="term">Enable PN-Hooks</span></dt><dd>
Checking this checkbox will force Pagesetter to run it's output through PostNuke's hooks system. This enables commenting, scoring and other hook based features. Unfortunately you cannot specify which hooks to apply.
</dd><dt><span class="term">Workflow</span></dt><dd>
The workflow configuration lets you define how complex a process you need for proof reading and approval of your publications. Pagesetter comes with three predefined workflows: "None", "Standard", and "Enterprise". The "None" workflow has no proofing or anything—publications are simply approved immediately upon submission. The "Standard" workflow is a two-step procedure with a moderator, and the "Enterprise" workflow is a three-step procedure with both editors and moderators. You can read more on workflows in the <a href="#chap_workflows" title="Chapter 12. Workflows">workflow chapter</a>.
</dd><dt><span class="term">Number of publications to show in list</span></dt><dd>
This lets you define how many publications you want to show up when this publication type is displayed on your PostNuke frontpage. It also applies to various blocks used by Pagesetter.
</dd><dt><span class="term">Sorting keys</span></dt><dd>
These lets you define the default sorting order and direction of the publication lists. You must have committed your choice of fields before they are available in the key selections.
</dd><dt><span class="term">Default filter</span></dt><dd>
This is a filter expression to be used when no other filter is supplied on the URL.
For instance "category:eq:5" to display all items with the field "category" set to category item ID 5.
Se <a href="#linkingfiltering" title="Filtering">Filtering</a>.
</dd><dt><span class="term">Default folder</span></dt><dd>To use this field you must first install the "Folder" module separately.
This field indicates where new publications should be located in the folder structure. If you do not select
a folder then Pagesetter won't use the Folder module.</dd><dt><span class="term">Default sub-folder</span></dt><dd><p>To use this field you must first install the "Folder" module separately.
If you want more control over the location of new publications then specify a sub-folder name here. The name
may include references to values in the publication which means you can create sub-folders on the fly by, for
instance, including either topic name, created date or even both in the sub-folder name!</p><p>The syntax is whatever Smarty uses (just like the templates) except that you <span class="emphasis"><em>must</em></span> use curly braces
to indicate Smarty variables. Besides that you can refer to any publication data in exactly the same way
as you would do in a template. The sub-folder name can include slashes to indicate sub-sub-...-sub-folders.
None of the sub-folders need to exist prior to creating a publication.</p><p>Example: to create a sub-folder based on the topic name and current year and month you could write
<code class="filename">{$core.topic.name}/{$core.created|date_format:"%Y/%m"}</code>. In this case you would
get a sub-folder named <code class="filename">Linux/2005/06</code> for a publication created in June 2005.</p></dd><dt><span class="term">Default topic</span></dt><dd>This is the topic which will be assigned to any dynamically created sub-folders.</dd></dl></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypesfieldtypes"></a>Field Types</h2></div></div></div><p>Each field in a publication must have a type associated with it.
Field types can be any of the following kinds:</p><div class="variablelist"><dl><dt><span class="term">string</span></dt><dd>
A simple text string with no formatting. Text is entered in a one-line input field.
</dd><dt><span class="term">text</span></dt><dd>
A simple text string with no formatting. Text is entered in a multi-line input field.
</dd><dt><span class="term">html</span></dt><dd>
An HTML formatted text input. Text is entered via a what-you-see-is-what-you-get editor (on the Internet Explorer and Mozilla).
</dd><dt><span class="term">bool</span></dt><dd>
A checkbox.
</dd><dt><span class="term">int</span></dt><dd>
Text field with validation for integers.
</dd><dt><span class="term">real</span></dt><dd>
Text field with validation for real numbers.
</dd><dt><span class="term">time</span></dt><dd>
Text field with validation for time (HH:MM).
</dd><dt><span class="term">date</span></dt><dd>
Text field with validation for dates (YYYY-MM-DD). Uses a JavaScript date picker.
</dd><dt><span class="term">User defined category</span></dt><dd>
Dropdown field with the items from the category.
</dd><dt><span class="term">image (url)</span></dt><dd>
The URL to a Photoshare image. The URL may either be entered manually or selected from any of Photoshare's albums.
</dd><dt><span class="term">Image (HTML)</span></dt><dd>The complete HTML for a Photoshare image. The HTML may either be edited manually or
inserted from Photoshare with a popup button.</dd><dt><span class="term">Image upload</span></dt><dd>
Field for uploading an image. Pagesetter automatically generates
thumbnails and download/display links for use in the templates.
</dd><dt><span class="term">Any upload</span></dt><dd>
Field for uploading of any kind of file (also images).
Pagesetter automatically generates download links for use in the templates.
</dd><dt><span class="term">Media (url)</span></dt><dd>
The URL to a multimedia file from Mediashare. The URL may either be entered manually or selected from any of
Mediashare's albums.
</dd><dt><span class="term">E-Mail</span></dt><dd>Text field with validation for E-mails and "mailto:" link in
input formular.</dd><dt><span class="term">Hyperlink</span></dt><dd>Text field with facilities for verifying URL when editing.</dd><dt><span class="term">Currency</span></dt><dd>Text field validation for numbers (identical to "real" but future versions
may add more semantics to this type.</dd><dt><span class="term">Publication</span></dt><dd><p>Dropdown field that allows you to select a publication from a specific
publication type. Can be used to make related publications, like company
departments with related employees. For that example you could use a Publication
field on the employee to select among the different departments, thereby
linking the employee to the department.</p><p>The Publication input requires you to specify what publication type
to choose from. <span class="emphasis"><em>This is done by clicking on the popup button next to the
field type selector.</em></span>. Please read the <a href="#chap_relations" title="Chapter 8. Publication Relations">Relations</a>
chapter for further information.</p></dd><dt><span class="term">Relation</span></dt><dd>A field that allows you to relate different publications to each other. Unlike
the Publication field mentioned above, you can make many-to-many relationships with this
kind of input field. Please read the <a href="#chap_relations" title="Chapter 8. Publication Relations">Relations</a>
chapter for further information.</dd></dl></div><p>Some examples of fields could be a headline (text), some
instructions (html), payment (real), the starting date of some event
(date) and so on. There is no restriction to how many fields you may
choose to use.</p><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="id4702522"></a>Upload handling</h3></div></div></div><p>Upload fields are just, from an abstract point of view, data
fields like all the other ones—you can have as many upload fields you
want in one publication and uploads are also handled correctly by the
revision control system.</p><p>When editing a publication with upload fields, you only need to
upload your files <span class="emphasis"><em>once</em></span>—even when editing and
previewing your input. Any uploaded file is stored temporarily until you
submit your publication, after which the uploaded file is permanently
stored with the publication.</p><p>Uploads are stored as files on the web server and only references
to these files are stored in the upload fields. You must configure the
location of the files in Pagesetter's admin panel (goto
administration::configuration::general). The upload directory must be
writable by the webserver for this to work.</p><p>Uploaded files are accessed via PostNuke's standard <code class="filename">index.php</code>
file and thereby through Pagesetter. This has two implications 1) files
are <span class="emphasis"><em>always</em></span> subject to the same access control as the publication
it is stored with, and 2) data must be streamed through PHP, generating
a performance overhead comparing to linking directly to the files.
<span class="emphasis"><em>It is the developers opinion that complete access control
is more important than performance in this case.</em></span></p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>
You should <span class="emphasis"><em>never</em></span> store your uploads in a directory
accessible through the web server since this makes it possible to
download the files without access control. Unfortunately this cannot
be avoided in some hosting environments, in which case you should name
your upload directory something unguessable.
</div><div class="section" lang="en-US"><div class="titlepage"><div><div><h4 class="title"><a name="id4702591"></a>Changing or deleting upload fields</h4></div></div></div><p>Pagesetter does not automatically delete uploads
associated with a publication type when an upload field is either
changed to another type or deleted.</p><p>Therefore you must manually delete the uploaded files
when you decide they are not in use anymore.</p><p>Uploaded files are named <code class="filename">TxPxRxF.dat</code> where
T is publication type, P is publication ID, R is revision and F
is field name. So if you remove field "document" on publication type 5
then you should delete all files named <code class="filename">5x*document.dat</code>.
</p></div></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypespubsetup"></a>Publication Setup</h2></div></div></div><p>See the <a href="#chap_tutorial" title="Chapter 2. Tutorial">tutorial</a>.</p></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pubtypescategories"></a>Categories</h2></div></div></div><p>It is possible to define categories to be used as dropdown elements
in the input. An example of a category could be a selection of music
media, for instance "CD", "DVD", "Tape", or "LP". A categorization could
also be book genres: "Fiction", "Art", "History", and so on. Categories
can even be nested, so for instance you can define sub-genres for books
"Fiction:Science Fiction" and "Fiction:Fantasy". The categories are
defined in this window:</p><div class="figure"><a name="id4702668"></a><p class="title"><b>Figure 5.2. Editing categories</b></p><div class="mediaobject"><img src="img/listEdit.jpg" alt="Editing categories"></div></div><p>It should be relatively simple; create a new category and then add
the items you want in it. When all is as expected you commit the setup to
the database. The category fields are:</p><div class="variablelist"><dl><dt><span class="term">Title</span></dt><dd>
A displayable value that can be shown to the user.
</dd><dt><span class="term">Value</span></dt><dd>
Any text string for your own use. The value field need not to be used, but can for instance help with sorting or selecting category items.
</dd><dt><span class="term">Description</span></dt><dd>
Help field which can be displayed as extra information about the category. Currently not used, but may in a future version of Pagesetter be used to generate automatic online help.
</dd></dl></div><p>The category can afterwards be used for one or more fields in the
publication types. Just select the category from the field type dropdown
in the publication setup window.</p></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_linking"></a>Chapter 6. Linking</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#linkingintro">Linking</a></span></dt><dt><span class="section"><a href="#linkingsorting">Sorting</a></span></dt><dt><span class="section"><a href="#linkingfiltering">Filtering</a></span></dt><dd><dl><dt><span class="section"><a href="#id4704975">Indirect Operands</a></span></dt></dl></dd><dt><span class="section"><a href="#linkingsettingdefaults">Setting Defaults for Editor</a></span></dt><dd><dl><dt><span class="section"><a href="#linkingsettingtopic">Setting Default Topic</a></span></dt></dl></dd></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingintro"></a>Linking</h2></div></div></div><p>Here is a list of the various Pagesetter URLs you can
use:</p><div class="variablelist"><dl><dt><span class="term">List: .../index.php?module=pagesetter</span></dt><dd>
The basic link used for Pagesetter on the frontpage. This
link shows the Pagesetter default publication list.
</dd><dt><span class="term">List:
.../index.php?module=pagesetter&tid=T&topic=P&lang=L</span></dt><dd>
The same as the above link but with various extra modifiers.
You can specify which publication type you want to show the list
for by setting tid to the type ID. In the same way you can specify
the topic ID as well as language (otherwise the current language
is used to filter the list). All the modifiers are optional and
can be mixed as necessary.
</dd><dt><span class="term">View: .../index.php?module=pagesetter&func=viewpub&tid=T&pid=P</span></dt><dd>
This is the link for viewing a specific publication of a
specific type. You need to set tid to the publication type ID and
pid to the publication ID.
</dd><dt><span class="term">Print:
.../index.php?module=pagesetter&func=printpub&tid=T&pid=P</span></dt><dd>
This is the link for showing a publication as
"printable"—which means without the PostNuke frameset and
with a special template. The tid and pid parameters works as
above.
</dd><dt><span class="term">Edit:
.../index.php?module=pagesetter&func=pubedit&tid=T</span></dt><dd>
This is the link for the creation of a new publication of
the publication type specified in tid. You can use this link for a
"Submit Publication" menu entry like the standard PostNuke "Submit
News" link.
</dd><dt><span class="term">Edit:
.../index.php?module=pagesetter&func=pubedit&tid=T&goback=1</span></dt><dd>
Edit link as above but redirect user to refering page after
edit is completed.
</dd><dt><span class="term">Edit list:
.../index.php?module=pagesetter&func=pubList&tid=T</span></dt><dd>
This is the link for the editor's list of publications and
is used for managing all the publications. As usual the tid
parameter identifies the publication type ID.
</dd><dt><span class="term">Inline display of uploaded file:
.../index.php?module=pagesetter&type=file&func=get&tid=T&pid=P&fid=F</span></dt><dd>
This is the link for inline display of an uploaded file or image. Use T and P for type ID
and publication ID as in the previous examples, and F for the field name of the
upload field. With this URL Pagesetter utilizes the Content-Disposition HTTP header
for marking the data as "inline".
</dd><dt><span class="term">Download of uploaded file:
.../index.php?module=pagesetter&type=file&func=get&tid=T&pid=P&fid=F&download=1</span></dt><dd>
This is the link for download of an uploaded file or image. Use T and P for type ID
and publication ID as in the previous examples, and F for the field name of the
upload field. With this URL Pagesetter utilizes the Content-Disposition HTTP header
for marking the data as "attachment".
</dd></dl></div><p>Here is a short description of the various URL
parameters:</p><div class="variablelist"><dl><dt><span class="term">tid</span></dt><dd>
Publication type ID.
</dd><dt><span class="term">pid</span></dt><dd>
Publication instance ID.
</dd><dt><span class="term">topic</span></dt><dd>
PostNuke topic ID.
</dd><dt><span class="term">lang</span></dt><dd>
PostNuke language ID.
</dd><dt><span class="term">fid</span></dt><dd>
Pagesetter field name for display of uploaded file.
</dd><dt><span class="term">download</span></dt><dd>
Request download of uploaded file instead of displaying it inline.
</dd><dt><span class="term">tpl</span></dt><dd>
Template format for overriding default. Use for instance "tpl=RSS" to access a template
file named <code class="filename">News-RSS.html</code>. The template name "News" is always
derived from the publication type and cannot be changed. If used with a list display
then Pagesetter will look for <code class="filename">News-RSS-header.html</code> and
<code class="filename">News-RSS-footer.html</code> also. If <code class="filename">News-RSS-header.html</code>
cannot be found then <code class="filename">News-RSS.html</code> is assumed to be a
single template list without header/footer.
</dd><dt><span class="term">pubcnt</span></dt><dd>
The number of publications to show on one page. If left out
then the publication type default is used. If set to zero then all
publications are shown.
</dd><dt><span class="term">goback</span></dt><dd>
Used to redirect the user back to refering page after
editing. Set it to 1 to enforce this redirection. If this
parameter is not set the user is redirected to the editors list of
publications.
</dd><dt><span class="term">backurl</span></dt><dd>
Used to redirect the user back to a specific page after
editing. Set it to the complete URL (http://...) to enforce this redirection.
You do not need to set <code class="varname">goback</code> when using <code class="varname">backurl</code>.
</dd></dl></div><p>Here you can see which parameters you can use for the different
functions (with less used functions included):</p><div class="table"><a name="id4702898"></a><p class="title"><b>Table 6.1. URL parameters</b></p><table summary="URL parameters" border="1"><colgroup><col><col><col><col><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Function</strong></span></td><td><span class="bold"><strong>tid</strong></span></td><td><span class="bold"><strong>pid</strong></span></td><td><span class="bold"><strong>topic</strong></span></td><td><span class="bold"><strong>lang</strong></span></td><td><span class="bold"><strong>tpl</strong></span></td><td><span class="bold"><strong>pubcnt</strong></span></td><td><span class="bold"><strong>Description</strong></span></td></tr><tr><td><span class="emphasis"><em>None</em></span></td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Normal publication list</td></tr><tr><td>viewpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display</td></tr><tr><td>printpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, no frames</td></tr><tr><td>dumppub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, no surrounding html tags</td></tr><tr><td>xmlpub</td><td>x</td><td>x</td><td> </td><td> </td><td>x</td><td> </td><td>Full publication display, adds content-type
text/xml</td></tr><tr><td>pubedit</td><td>x</td><td>x</td><td> </td><td> </td><td> </td><td> </td><td>Edit publication</td></tr><tr><td>publist</td><td>x</td><td> </td><td> </td><td> </td><td> </td><td> </td><td>Editor's list of publiations</td></tr><tr><td>printlist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, no frames</td></tr><tr><td>dumplist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, no surrounding html
tags</td></tr><tr><td>xmllist</td><td>x</td><td> </td><td>x</td><td>x</td><td>x</td><td>x</td><td>Display list of publications, adds content-type
text/xml</td></tr></tbody></table></div><p>Here is a list of the templates required for the various
options:</p><div class="table"><a name="id4701989"></a><p class="title"><b>Table 6.2. Template overview by URL function</b></p><table summary="Template overview by URL function" border="1"><colgroup><col><col><col><col></colgroup><tbody><tr><td><span class="bold"><strong>Function</strong></span></td><td><span class="bold"><strong>Header / footer</strong></span></td><td><span class="bold"><strong>Def. Template</strong></span></td><td><span class="bold"><strong>Description</strong></span></td></tr><tr><td><span class="emphasis"><em>None</em></span></td><td>x</td><td>list</td><td>Normal publication list</td></tr><tr><td>viewpub</td><td> </td><td>full</td><td>Full publication display</td></tr><tr><td>printpub</td><td> </td><td>print</td><td>Full publication display, no frames</td></tr><tr><td>dumppub</td><td> </td><td>print</td><td>Full publication display, no surrounding html tags</td></tr><tr><td>xmlpub</td><td> </td><td>xml</td><td>Full publication display, adds content-type
text/xml</td></tr><tr><td>pubedit</td><td> </td><td>-</td><td>Edit publication</td></tr><tr><td>publist</td><td> </td><td>-</td><td>Editor's list of publiations</td></tr><tr><td>printlist</td><td>x</td><td>list</td><td>Display list of publications, no frames</td></tr><tr><td>dumplist</td><td>x</td><td>list</td><td>Display list of publications, no surrounding html
tags</td></tr><tr><td>xmllist</td><td>x</td><td>list</td><td>Display list of publications, adds content-type
text/xml</td></tr></tbody></table></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingsorting"></a>Sorting</h2></div></div></div><p>With Pagesetter you can sort the various lists of publications via
restrictions in URL. To do so you specify "orderby=field-list". The list
of fields is separated by commas and you refer to the field names as you
would do in a template. Either as <code class="varname">fieldName</code> or as
<code class="varname">core.fieldName</code>. The default sorting direction is ascending,
but descending can be specified with a ":desc" appended to a field name.</p><div class="example"><a name="id4704482"></a><p class="title"><b>Example 6.1. Ordering by core fields</b></p><div class="variablelist"><dl><dt><span class="term">orderby=core.author,title</span></dt><dd>Order by author and title.</dd><dt><span class="term">orderby=core.hitCount:desc</span></dt><dd>Order by hitCount descending, neat for displaying a "most read
articles" box.</dd></dl></div></div><div class="example"><a name="id4704518"></a><p class="title"><b>Example 6.2. Ordering by category fields and category field properties</b></p><div class="variablelist"><dl><dt><span class="term">orderby=category</span></dt><dd>Order by the sequence defined in the category list.</dd><dt><span class="term">orderby=category.value</span></dt><dd>Order by the value defined in the category list.</dd><dt><span class="term">orderby=category.title</span></dt><dd>Order by the title defined in the category list. </dd><dt><span class="term">orderby=category.fullTitle</span></dt><dd>Order by the full title (e.g. Books:Art:Painting).</dd><dt><span class="term">orderby=category,core.created</span></dt><dd>Order by the sequence defined in the category list and by the date
and time the publication was created.</dd></dl></div></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingfiltering"></a>Filtering</h2></div></div></div><p>It is also possible to filter the various lists of publications via
restrictions in the URL. To add a filter you simply specify "filter=expr" in
the URL where expr is a filter expression. Filter expressions are written
as comma-separated lists of filter terms where each term consists of a
field name, an operator, and an operand separated by colons or hats (^). A single
filter combines all it's expressions using an AND-operator (making it a
conjunction). The possible filter operators are:</p><div class="variablelist"><dl><dt><span class="term">eq</span></dt><dd>
Equal.
</dd><dt><span class="term">ne</span></dt><dd>
Not equal.
</dd><dt><span class="term">lt</span></dt><dd>
Less than.
</dd><dt><span class="term">le</span></dt><dd>
Less than or equal.
</dd><dt><span class="term">gt</span></dt><dd>
Greater than.
</dd><dt><span class="term">ge</span></dt><dd>
Greater than or equal.
</dd><dt><span class="term">like</span></dt><dd>
Using database's LIKE operator to match operand as
'%operand%'.
</dd><dt><span class="term">null</span></dt><dd>
Test for field being NULL. Should be used without an
operand—like filter=FieldName:null.
</dd><dt><span class="term">nottnull</span></dt><dd>
Test for field being NOT NULL. Should be used without an
operand—like filter=FieldName:notnull.
</dd><dt><span class="term">sub</span></dt><dd>
Test for a list field being equal to or an descendant of the
operand. Only valid for category fields.
</dd><dt><span class="term">rel</span></dt><dd>
"Related to"—Test for a relationship field being related to a specific publication item ID.
For instance "department:rel:PID", where <code class="varname">PID</code> is a
publication ID. The "department" field would normally be a field in publication
type T1 (for instance an "Employee", whereas the PID would be from another
publication type T2 (for instance a "Department").
</dd><dt><span class="term">nrel</span></dt><dd>
"Not related to"—The opposite of the "rel" operator (what ever that means).
</dd></dl></div><p>The right hand side operands in a filter expression may contain
"@now" which will expand to the current date. This may although not be
that usefull since there is no support yet for plus or minus
operators.</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3>Beware that URL variables are separated with ampersands "&".
Ampersands are therefore also used to separate different filters on the
URL. But multiple filters are OR-ed together <span class="emphasis"><em>which is opposite
the usual interpretation of the ampersand!</em></span></div><p>Multiple filters can be combined on the URL using "filterN=expr"
where N is an integer starting from 1. Multiple filters are combined using
an OR-operator (putting the whole filter language in a disjunctive normal
form).</p><div class="example"><a name="id4704802"></a><p class="title"><b>Example 6.3. Filtering</b></p><div class="variablelist"><dl><dt><span class="term">filter=title:like:pagesetter</span></dt><dd>
Find all the publications where the title field contains the
word "pagesetter".
</dd><dt><span class="term">filter=age:ge:18</span></dt><dd>
Find all the publications where the age field is greater
than or equal to 18.
</dd><dt><span class="term">filter=age:ge:18,country:eq:DK</span></dt><dd>
Find all the publications where the age field is greater
than or equal to 18 and the country is equal to "DK".
</dd><dt><span class="term">filter1=age:ge:18,country:eq:DK&filter2=country:eq:NO</span></dt><dd>
Find all the publications where (1) the age field is greater
than or equal to 18 and the country is equal to "DK", or (2) the
country is equal to "NO".
</dd></dl></div></div><p>Now assume we have a book category as shown in the following image
and use this in a book review publication with a field named "category"
(using the category type of course).</p><div class="figure"><a name="id4704876"></a><p class="title"><b>Figure 6.1. Example categories used for books</b></p><div class="mediaobject"><img src="img/bookGenres.jpg" alt="Example categories used for books"></div></div><p>Then we can select various sub-sets of the reviews with the following
examples.</p><div class="example"><a name="id4704902"></a><p class="title"><b>Example 6.4. Filtering by category fields</b></p><div class="variablelist"><dl><dt><span class="term">filter=category:eq:8</span></dt><dd>
Find all the reviews of category "Fiction"—but not
sub-sets of that. <span class="emphasis"><em>The value to compare with is
the category ID!</em></span>.
</dd><dt><span class="term">filter=category:sub:8</span></dt><dd>
Find all the reviews of category "Fiction" and any sub-sets
of that (Science Fiction and Classics). <span class="emphasis"><em>The value
to compare with is the category ID!</em></span>.
</dd><dt><span class="term">filter1=category:sub:11&filter2=category:eq:23</span></dt><dd>
Find all the art(11) and drinks(23) reviews, but not
non-alcoholic drinks (since we use the eq operator instead of sub
operator). <span class="emphasis"><em>The value to compare with is
the category ID!</em></span>.
</dd></dl></div></div><p>It is furthermore possible to match all items using the special list
value "top", for instance in a filter like
"filter=category:sub:top".</p><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="id4704975"></a>Indirect Operands</h3></div></div></div><p>The above setup is fine as long as you are using hard-coded URLs.
But when you want to let the user enter something in a form and then
filter by that, you need to refer to other URL variables in the filter.
Assume for instance you want to filter a keywords field using the like
operator based on something the user enters in a form. The user input is
entered in a HTML input field named "keyword". Now we can refer to the URL
variable as "$keyword" in a filter like
"filter=keywordField:like:$keyword".</p><div class="figure"><a name="id4704993"></a><p class="title"><b>Figure 6.2. Indirect operands used in input formular</b></p><div class="mediaobject"><img src="img/filter1.jpg" alt="Indirect operands used in input formular"></div></div><p>An example template using this feature could look like this for the
list-header template of a knowledge base:</p><pre class="programlisting"><div class="pn-pagetitle">Knowledge Base</div>
<form action="<!--[pnmodurl modname="pagesetter" tid=$core.tid]-->" method="POST">
<table>
<tr><td>Keyword:</td><td><input type="text" name="keyword"></td><tr>
<tr><td><input type="submit" value="Update"></td><tr>
</table>
<input type="hidden" name="filter"
value="keywordField:like:$keyword">
</form>
<ul></pre></div></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linkingsettingdefaults"></a>Setting Defaults for Editor</h2></div></div></div><p>You can assign default values to the editor when creating a new
publication. Simply add "set_xxx=yyy" to the URL and the user defined
variable <code class="varname">xxx</code> will be set to the default value yyy instead of being empty.
Use category ID for category fields. Example: assume you have a News
publication and a Project publication. The News publication can be
categorized by some category. The same goes for your projects. On each
project page you can now add a "Submit Related News" link that presets the
category of the News item to that of the current project. To do so your
Project template must contain something like this:</p><pre class="programlisting"><div class="pn-pagetitle">Projects</div>
...
<a href="<!--[modurl module=pagesetter func=pubedit tid=T
set_category=$category.id]-->">...</a>
...</pre><div class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a name="linkingsettingtopic"></a>Setting Default Topic</h3></div></div></div><p>The default topic is, for no really good reason, handled specially. You can set the topic
via the URL variable <code class="varname">topicid</code>. The value must be a topic id.</p></div></div></div><div class="chapter" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a name="chap_templates"></a>Chapter 7. Templates</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#templatesintro">Templates</a></span></dt><dt><span class="section"><a href="#templatesvarstart">Template Variables</a></span></dt><dd><dl><dt><span class="section"><a href="#templatesvarlistitems">Using Categories</a></span></dt><dt><span class="section"><a href="#templatesvarpageable">Using Pageable Fields</a></span></dt><dt><span class="section"><a href="#id4703438">Using upload fields</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesvarhitcounts">Showing Hit Counts</a></span></dt><dt><span class="section"><a href="#templatesvaredit">Showing "Edit This" Link</a></span></dt><dt><span class="section"><a href="#templatessinglemultiplestart">Single and Multiple List Templates</a></span></dt><dd><dl><dt><span class="section"><a href="#templatessingle">Single Template</a></span></dt><dt><span class="section"><a href="#templatesmultiple">Multiple Templates</a></span></dt></dl></dd><dt><span class="section"><a href="#templatesthemespecific">Theme Specific Templates</a></span></dt><dt><span class="section"><a href="#templatesoperations">Template Operations</a></span></dt><dt><span class="section"><a href="#templatesauto">Auto Generated Templates</a></span></dt><dt><span class="section"><a href="#templatespnrenderplugins">pnRender Plugins</a></span></dt><dt><span class="section"><a href="#templatesrelations">Relating Items to Each Other</a></span></dt><dt><span class="section"><a href="#templatesfolder">Folder Templates</a></span></dt></dl></div><div class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="templatesintro"></a>Templates</h2></div></div></div><p>The output templating system uses a set of template files for each
publication type and depends on the PostNuke .75 pnRender system (see
installation guide).</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
You can read a lot more about the Smarty templating system (that pnRender
builds on, and thereby Pagesetter) on
<a href="http://smarty.php.net/" target="_top">smarty.php.net</a>.
</div><p>The template files are stored in <code class="filename">pagesetter/pntemplates/...</code>
and they are named after the publication template name
like "<span class="emphasis"><em>template</em></span>-<span class="emphasis"><em>format</em></span>.html" where
<span class="emphasis"><em>template</em></span> is specified in the publication setup and