Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   GetDocObjectLink
  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
GetDocObjectLink
  Returns the encoded hyperlink to a DocObject.
 
Library module::publisher/template-v2.whlib
 
Syntax PUBLIC STRING FUNCTION GetDocObjectLink (INTEGER targetobjid)
 
Description GetDocObjectLink returns the hyperlink to the DocObject with ID = targetobjid.
By default the function returns a relative link. If you want the function to return an absolute link, use the
SetAbsoluteLinks function, or use the MakeDocObjectLink function.
 
Parameters
targetobjid ID of the docobject to link to
 
Returns A properly encoded hyperlink to the requested docobject
 
Example
// print the relative link to the DocObject with ID=3
Print ( GetDocObjectLink(3) );

// print the relative URL to the first DocObject on the first page
RECORD FirstPage := FindPage(1);
INTEGER firstobjectid := FirstPage.FirstDocObject;
Print ( GetDocObjectLink(firstobjectid) );

// print the absolute URL to the first DocObject on the first page
SetAbsoluteLinks(TRUE);
RECORD FirstPage := FindPage(1);
INTEGER firstobjectid := FirstPage.FirstDocObject;
Print ( GetDocObjectLink(firstobjectid) );
 
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