<Plugins>

<Plugins> can be used to easily add well-behaved, third-party scripts, stylesheets and specialized programming code to your website headers and footers. This is generally doen through the use of themes. Gigatrees provides default themes that can be used to get started. Plugins are loaded in the order they are defined. To get a better understanding of how plugins work, you should review the plugins provided in the Gigatrees distribution, especially gigatrees and the themes. To create a new plugin, create a folder with the name of your plugin in the plugins folder and create a text file named plugin.xml in that folder. That file should contain the <Gigatrees> XML wrapper and any additional options required by that plugin. Additional support files can be put anywhere inside the named plugin folder or into subfolders and then accessed using %PluginsURL%.

Example

The following example copies over the default set of plugins found in the user configuration file ( user.xml ).

<Plugins>
  <Plugin> plugins\lang.eng  </Plugin>
  <Plugin> plugins\gigatrees </Plugin>
  <Plugin> plugins\theme.a   </Plugin>
</Plugins>

Options

<CopyPlugins>
[ true ]
By default, all configured plugins are copied to the <OutputPath>. Since plugins seldom change once created, you could choose to not copy the plugins repeatedly.
<Plugin>
[ ]
Expects an absolute or relative path to a plugin folder.

Technical Details

The existing plugins make use of a number of predefined placeholders.


%OutputPath%
This value is determined at runtime by the <OutputPath> option.
%PreHeader%
This value is determined by the <PreHeader> option. This placeholder is not used by any of the existing plugins, but may be useful to web developers for adding PHP code to the top of their page.
%DropHeader%
This value is determined by the <DropHeader> option.
%DropStyles%
This value is determined by the <DropStyles> option.
%DropBody%
This value is determined by the <DropBody> option.
%DropFooter%
This value is determined by the <DropFooter> option.
%DropMenu%
This value is determined by the <DropMenu> option.
%Domain%
This value is determined by the <Domain> option.
%RootURL%
This value is determined by the <Domain> and <RootPath> options.
%PluginsURL%
This value is determined at runtime using the relative path of the plugins folder. This placeholder should be used in every plugin that needs access to this path.
%Favicon%
This value is determined by the <Favicon> option.
%LangCode%
This value is determined by the <LangCode> option.
%SiteAvatar%
This value is determined at runtime using the <SiteAvatar> option.
%SiteBanner%
This value is determined at runtime using the <SiteBanner> option.
%SiteDescription%
This value is determined by the <SiteDescription> option.
%SiteLogo%
This value is determined at runtime using the <SiteLogo> option.
%SiteOwner%
This value is determined by the <SiteOwner> option.
%SiteTitle%
This value is determined by the <SiteTitle> option.
%SiteHeading%
This value is determined at runtime using the <SiteTitle> option, but will be left empty if the <SiteLogo> option is set.
%ExtendMenu%
This value is determined by the <ExtendMenu> option.

The following site level placeholders are internally generated.

%AppURL%
This value is set to https://gigatrees.com.
%AppName%
This value is set to 'Gigatrees'.
%AppVersion%
This value is determined at runtime using the application major and minor version numbers.
%Application%
This value is determined at runtime using the application name, application version number and application build version number.
%BuildVersion%
This value is determined at runtime using the application build version number.
%RootPath%
This value is always set to a page's relative path of the site's root folder.
%HomePage%
This value is always set to a page's relative path of the site's index page.
%BlogPath%
This value is always set to a page's relative path of the blog's root folder.
%BlogPage%
This value is always set to a page's relative path of the blog index page. This can be used to access the blog index when using a site landing page with blog id of 'index'.
%Extension%
This value is set to .html for HTML builds and is left blank for database builds.
%FeedLink%
This value is determined at runtime, providing a link to the feed ( feed.rss ).

The following page level placeholders are internally generated.

%PageURL%
This value is determined at runtime using the <WebsitURL> option and the page's filename path.
%PageFilename%
This value is determined at runtime using the <BlogPosts><Filename> option or an automatically generated filename based on a page's context.
%PageTitle%
This value is determined at runtime using the <BlogPosts><Title> option or an automatically generated title based on a page's context.
%PageAuthor%
This value is determined at runtime using the <BlogPosts><Author> option or the <SiteOwner> option.
%PageImage%
This value is determined at runtime using the <BlogPosts><MediaId> option or the <SiteBanner> option.
%PageStyles%
This value is determined by the <BlogPosts><StyleOverrides> option.
%Keywords%
This value is determined at runtime using the <BlogPosts><Hashtag> option and any other hash tags it finds embedded within a blog post.
%PageRedirect%
This value is determined by the <BlogPosts><Redirect> option.
Comments