Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   OpenFile
  Home |  WebHare Lite |  Downloads |  HareScript |  Websites/CMS |  Applications
Search for:  in: 
Websites/CMS
Website development
Publication functions
 
Functions for publisher database
Navigation path library
Provides HTML output control functions
Templates
Utility library for static publications
OpenFile
  Open an output file.
 
Library module::publisher/template-v2.whlib
 
Syntax PUBLIC MACRO OpenFile (INTEGER pagenum)
 
Description OpenFile opens a new output file for the page with ID pagenum. All new output will be redirected to this file until
the CloseFile macro is called. You can nest up to 32 OpenFile macros, but make sure each file is closed using the
CloseFile macro. The OpenFile and CloseFile macros are antagonists, and must be used in that way. Nested OpenFile
macros can for example be used to create TOC pages easily, without having to create and update local record arrays
in which relevant DocObject are stored during template execution.
 
Parameters
pagenum ID of the page for which an output page should be opened
 
Example
// Loop through all pages, open an output file for every page,
// print the docobjects, close the file.
RECORD ARRAY allpages := SELECT id,name FROM pages;
FOREVERY (RECORD thispage FROM allpages)
{
OpenFile(thispage.id);
PrintPageBody();
CloseFile();
}
 
In library 'template-v2'
AddPublicationWarning
CloseFile
CorrectHyperlink
CreateFile
CreateFileFromBlob
DeletePage
FindDocObject
FindPage
GetConvertedHyperlinks
GetCurrentPageId
GetCurrentPageName
GetCurrentPageUrl
GetDocObjectLink
GetDocObjectRawText
GetFileLinkByName
GetHTMLDocId
GetHTMLFileId
GetPageLink
GetPageLinkByName
GetSourceDocumentInfo
GetTocChildren
GetTocChildrenIDS
GetTocTree
GetTocTreeIDS
InsertPage
MakeDocObjectLink
MakeFileLinkByName
MakePageLink
MakePageLinkByName
OpenFile
PrintAnyPage
PrintDocObject
PrintPageBody
RenamePage
SetAbsoluteLinks
SetupHTMLOutput
 
Top To top of page