Task-driven tutorials and recipes for PageSeeder

How to create a website (or Berlioz) publish script in PageSeeder (Advanced)

Skills requiredXML
Time required (minutes)30
Intended audienceDeveloper


This tutorial demonstrates the use of advanced features in publish scripts to process folders in PageSeeder. These kinds of features are typically required for more advanced website publishing.



Please make sure you have the following items setup before proceeding:

PageSeeder (version 5.7 or above) installed, see Installation guide for setting up PageSeeder;

Jetty and Berlioz website installed;

FTP server in target website server;

Exposure to XML language;

Experience in programming Apache ANT script. See manual  for more information.


Create PageSeeder webapp config

Create a publish configuration file. See publish-config.


using the following content:

<?xml version="1.0"?>
  <action type="publish">
    <source type="folder"/>
    <target name="ps-publish-website-folder">
      <description>Publish folder to website</description>

Publish parameters

Following are examples of parameters available on the publish. For a complete reference, see <publishing>.

  • Sample for date pick option
<target name="ps-publish-website-folder">
<param label="File last modified date sinc"
  • Sample for selective option

<param label="Document status"
        default="Approved" >
   <value>In Progress</value>

Define Publish FTP property file

Create a website properties file: 


with the following content:

# --------------------------------------------------------------------------- #
# BERLIOZ PROPERTIES FOR A WEBSITE (Server)                                   #
# --------------------------------------------------------------------------- #
# This file will be copied to the /config directory of your project on the    #
# publisher when your deploy this publish script to the server using FTP      #
# (build.xml > deploy-server).                                                #
#                                                                             #
# This file will ultimately be used by the Publisher on your PageSeeder       #
# production server when you publish your group/document to the Website. It   #
# should therefore specify the properties of your production Berlioz Website. #
# --------------------------------------------------------------------------- #

# FTP properties
ftp.server=[Host URL]
ftp.userid=[Host User ID]
ftp.password=[Host User Password]
ftp.dir=webapps[Host Remote Folder]

Publish the content of a folder

This folder publish will export all content including documents, images and binary files and then copy the files to a server via FTP.

On the target server, the corresponding folder is deleted and the new content is written on top of it.

Get the basic publishing script (refer to How to create a website (or Berlioz) publish script in PageSeeder).

To modify the ps:export options, see the reference page for the Export task. Some examples are as follows:

  • Export using document status
<filter with="psstatus:${ps.param.document-status}" />
  • Export using the document last modified date
<filter since="${ps.param.file-date}"/>
  • Export PDF files since the date selected in publishing option
<filter with="psmediatype:application/pdf"

Check the configuration

To check if the Publish option is properly enabled at the folder level. Go to the Document -> Browse.


Created on , last edited on