General tips for using PortWeb templates


<< Where does PortWeb store ...
Back to Portfolio FAQ index
'PortWeb could not find t ... >>

Don't forget that to test your templates, they must first be in, or imported into, the Catalogue you are using and this Catalogue must be served via PortWeb for the 'item' section of the template to render correctly in your browser. Viewing the template as a simple HTML page (e.g. if exported from the Catalogue) you will see the 'header' and 'footer' sections correctly wrapping a single 'item'.

Although you won't be able access your Catalogue as 'Administrator' when it is served via PortWeb, you can access it as 'Publisher' and still access the "Edit HTML" dialog. To fine tune templates, do minor edits at the "Edit HTML" dialog. As soon as you've saved a template at that dialog, PortWeb will then use the updated version for the pages that it serves, allowing quick verification of any fixes. Note that you may need to flush your browser's cache to ensure the new page is being displayed and not an older version.

In a big project, or where the Catalogue is being served at a remote location, you may wish to archive the final version of your catalogue's template(s) outside Portfolio by exporting them from the "Edit HTML" dialog. To do this open each one in turn for editing from the "Export HTML" dialog.

For those who are going to be using templates regularly or modifying them for other projects, you may find it useful to add some of the info only available in "Edit HTML" dialog. For instance (note that 'Items' is simple #Rows x #Columns):

<!-- Template=myName -->
<!-- Rows=4 -->
<!-- Columns=4 -->
<!-- Items=16 -->
<!-- Catalogue=myCat.fdb -->

Why do this? Two reasons. Firstly, at the basic level you can look at any PortWeb page and see where it came from and the template (version) used which can help when debugging - always assuming you put the right info into these comments, as this is a manual task! Secondly, the information is useful for scripts and you may well be working on these when editing the template outside the Portfolio client. The HTML comments ensure the information is always to hand as a reference in the source code - though you may want to strip this fat for live use when you've finished editing.



Question: General tips for using PortWeb templates [FAQ00213.htm]
Last Update:- 31 May 2006


<< Where does PortWeb store ...
Back to Portfolio FAQ index
'PortWeb could not find t ... >>

Quick Search of PortfolioFAQ (word, words or phase): or try the Advanced Search

User-to-User Forums  |  Report error/typo/broken link  |  Request new topic  |  Ask a question

Site and articles © Mark Anderson 2001-2007 - Visit my home page


This FAQ is created and maintained using
Friday logo
Friday - The Automatic FAQ Maker