7.1
Table Of Contents
- Table of Content
- Overview
- Understanding PrintShop Mail Web
- Getting Started
- The PrintShop Mail Web Interface
- Publishing Workflow
- Ordering Workflow
- New Document
- Order Manager
- Checkout
- Companies
- Users
- Publication Types
- Collections
- Settings
- About
- License
- Roles
- Languages
- Web Design
- Maintenance
- Settings
- Currencies
- Tax Rates
- Shipping Rates
- Calendar
- Production Settings
- User Input Field Defaults
- Output Folders
- Job options
- Printers
- E-mail Settings
- E-mail Addressees
- Managing E-mail Templates
- Modules Settings
- Enabling a MIS connector
- Installed modules
- Properties
- Enabling a Print Production connector
- Installed modules
- Properties
- Requirements
- Configuring the module
- The PayPal Sandbox
- Processing orders
- Requirements
- Configuring the Authorize.net module
- Test mode
- AVS and CCV checks
- Payment page
- Requirements
- Requesting a test account
- Configuring the iDEAL test dashboard
- Configuring the iDeal module
- Requirements
- Configuring the Moneris module
- Test mode
- Requesting a live account
- AVS and CVD checks
- Payment page
- Add a new Module
- Configure a module
- Delete a Module
- XML (eXtensible Markup Language)
- Options
- Sample POST receive script
- Interaction With PrintShop Mail Design
- Introduction to Regular Expressions
- Introduction
- Skinning Guide
- Getting started
- Creating your own skin
- The template file
- HMTL Outline
- Styling
- Key Concepts
- Style organization
- Header
- User information
- Menu bar
- Background
- Overview tables
- Edit forms
- Sub menus
- Special variables
- Variables for template files
- Variables for style files
- Creating page exceptions
- Creating a page specific template file
- Modifying a page specific template file
- DOM manipulation using jQuery
- Launching code on Document Ready
- Populating fields with computed values
- Removing elements from the DOM
- Adding information to the DOM
- Customizing the store front
- Storefront class
- Creating a hierarchical tree
- Adding a live search option
- Copyright Information
- Index
This function generates the <li> elements required by the Treeview plugin. When a publication type contains one or multiple
documents a sub list is created, again using <ul> and <li> elements. For each document a link to the preview_init_form is
inserted supplying the internal ID of the document. The functions of the preview_init_form file determine the workflow of that
document (e.g. show the User Input fields page or Database Upload page).
foreach ($treeDataArray as $publicationTypes)
{
renderPublicationType($publicationTypes);
}
function renderPublicationType($publicationType)
{
echo "<li><span class='folder'>" . $publicationType['name'] . "</span><ul>";
if (isset($publicationType['publicationTypes'])) {
foreach ($publicationType['publicationTypes'] as $subPublicationType) {
renderPublicationType($subPublicationType);
}
}
if (isset($publicationType['documents'])) {
foreach ($publicationType['documents'] as $document) {
echo "<li><span class='file'>";
echo "<a href='site.php?formid=preview_init_form&id=" . $document['id'] . "'>";
echo $document['name'];
echo "</a>";
echo "</span></li>";
}
} else {
if (!isset($publicationType['publicationTypes'])) {
echo "<li><a href='#'>-</a></li>";
}
}
echo "</ul></li>";
}
Virtual Subfolders
In the current version of PrintShop Mail Web a publication type can not contain subfolders. You can however simulate nested
publication types. The getTree() function can create virtual sub publication types or sub folders based on a delimiter character
that appears in a document name.
When you call the function as follows getTree('', '_');, it will split the template names using the underscore character (if it
exists in the name). The parts are used for the virtual folder name, the last part is used as the document name.
©2010 Objectif Lune Inc - 258 -