You are here: Administrators Reference > Creating, Managing, and Deleting Sites and Subsites > Stub Files

Stub Files

In order to provide an addressable URL for each page, CommonSpot generates a "stub file" for each page. Stub files are created in the subdirectory containing the page. Each stub file is approximately 1-2K bytes in size. The name of the stub file is automatically generated from the Name field in the Create Page dialog. Underscores replace spaces, to ensure properly formatted names.

Any change to a page will regenerate stub file contents. Stub files can also be regenerated for changes made to any of the templates from which a page is derived.

For this reason, direct editing of any stub file is not recommended, since any regeneration will overwrite changes.

The following is a sample stub file:

<cfprocessingdirective pageencoding="iso-8859-1" />

<!--- // DO NOT MODIFY OR DELETE ANY INFORMATION FROM THIS FILE --->

<CFSETTING ENABLECFOUTPUTONLY="YES">

<CFSCRIPT>

Application.TemplateCache.LoadTemplateProperties("template-Base-Plus-One-Template.cfm","2","1");

Page = Request.Page;

Page.StubVersion = "05.00.00.09";

Page.StubLastUpdated = "2007-10-20 18:15:04";

Page.CustomSecurityElements = "1092";

Page.HasCustomSecurity = "0";

Page.Caption = "Home";

Page.CategoryID = "10";

Page.Confidentiality = "5";

Page.Description = "Welcome";

Page.CreatorID="1000005";

Page.DateAdded="2006-01-05 22:25:21";

Page.DateContentLastChecked="2007-10-11 15:35:49";

Page.DateContentLastMajorRevision="2006-01-05 22:25:30";

Page.DateContentLastModified="2007-10-11 15:35:49";

Page.FileName="index.cfm";

Page.ID=1046;

Page.InheritedTemplateList="2,1";

Page.IsPublic=15;

Page.Name="index";

Page.OwnerID="1000005";

Page.PageType="0";

Page.PageIDList="1046,2,1";

Page.ParentID="0";

Page.ParentTemplateID="2";

Page.PublicReleaseDate="2006-01-13 12:17:35";

Page.Title="Welcome";

Page.Uploaded="0";

Page.LastUpdateAuthorIDList="1000005";

Page.LastUpdateApproverID="1000005";

Page.ApprovalStatus="0";

Page.KeywordList = "";

Page.RenderOptions = "";

Page.PageSetID = "0";

Page.PageSetInfoFile = "";

Page.LangSetID = "0";

Page.UsesCustomRender = "1";

Page.DynamicDetectMode = 2;

Page.CacheEventID = 0;

Page.UseStyleSheets = 2;

Page.cacheStyleSheets = 1;

Page.MinimumCachePersistence = 0;

Page.stylePageID = 2;

Page.activeStyleSheetGroup = 533;

Page.styleSheetList = "main.css";

Page.ClassNames = Server.CommonSpot.UDF.util.duplicateBean(Request.Page.ClassNames);

Page.MetaData = Server.CommonSpot.UDF.util.duplicateBean(Request.Page.MetaData);

Page.ClassNames["1091"] = Server.CommonSpot.UDF.util.getBean("ElementClasses");

Page.ClassNames["1091"]["19000"] = "welcome";

Page.ClassNames["1091"]["19001"] = "";

Page.ClassDefPages["1091"] = 1046;

Page.ClassNames["24632"] = Server.CommonSpot.UDF.util.getBean("ElementClasses");

Page.ClassNames["24632"]["19000"] = "";

Page.ClassNames["24632"]["19001"] = "";

Page.ClassDefPages["24632"] = 1046;

Page.ClassNames["1093"] = Server.CommonSpot.UDF.util.getBean("ElementClasses");

Page.ClassNames["1093"]["19000"] = "whatsnew";

Page.ClassNames["1093"]["19001"] = "";

Page.ClassDefPages["1093"] = 1046;

Page.ClassNames["22358"] = Server.CommonSpot.UDF.util.getBean("ElementClasses");

Page.ClassNames["22358"]["25002"] = "tagline";

Page.ClassNames["22358"]["25001"] = "";

Page.ClassNames["22358"]["25000"] = "";

Page.ClassDefPages["22358"] = 1046;

Page.ClassNames["1094"] = Server.CommonSpot.UDF.util.getBean("ElementClasses");

Page.ClassDefPages["1094"] = 1046;

Page.MetaData["Layout"] = Server.CommonSpot.UDF.util.getBean("MetaDataForm");

Page.MetaData["Layout"]["leftColumn"] = "Subsite Menu";

Page.MetaData["Layout"]["showRightColumn"] = "";

Page.MetaData["Design"] = Server.CommonSpot.UDF.util.getBean("MetaDataForm");

Page.MetaData["Design"]["DesignOption"] = "Home";

Request.Page = Page;

includeMaster = 1;

if (IsDefined("Attributes.includeMaster"))

includeMaster = Attributes.includeMaster;

</CFSCRIPT>

<CFIF includeMaster is 1>

<CFINCLUDE TEMPLATE="/commonspot/master.cfm">

</CFIF>

As you can see, there is no HTML per se in the stub file. Instead, a ColdFusion structure named Page is created and populated with information regarding the page, such as the page id, name, base template, template hierarchy, metadata, style information, version timestamp and more. At the bottom of the file, after the structure is completely built, the main processing module in CommonSpot, master.cfm is included. This module will handle the construction of the page.

A stub file must exist in order for the page to render. Otherwise the HTTP server returns a 404 error. If a stub file is accidentally deleted, use the Site or Subsite Rebuild Stub Files utility to rebuild all stub files. Stub files are also automatically rebuilt upon the first request for the page, if the variable Page.StubVersion if the stub file is older than the supported code.

 

Related Links


You can download PDF versions of the Content Contributor's, Administrator's, and Elements Reference documents from the support section of paperthin.com (requires login).


For technical support:

http://www.paperthin.com/support/