Documentation > CMS Template API Library > OutputContext > PublishUrl
PublishUrl
Current value of the publish URL (relative). It can be overridden in url.aspx or asseturl.aspx. The URL is used to generate links to an asset or other resource. PublishUrl must sometimes may generated independently of the filename depending on how the server is setup. WARNING: This value is not populated and has no effect in filename.aspx and assetfilename.aspx
Type
System.String
Code Example
C#
Sample:
// overriding the publish url in url.aspx context.PublishUrl = context.PublishUrl + context.PageNumber + ".html";