Stationary articles (header, footer etc)

This sample shows how to create a stationary or sticky objects (articles, links etc) on a page. These are objects that appear in the same place no matter what section is currently selected, for example: footer articles or links.

The sample script is specifically about how to create footer articles that do not appear in site search, the same prinicple can be used for any stationary area or objects.

The principle behind is to have one specific parent that is always available but is different for every language that the site has and avoid any hardcoding of ID's. The script can be used in version 4.4.2 or higher.

{init_objects name="footer_articles" parent_system_alias="system" classes="article" position="75"}

{foreach from=$footer_articles item="articles"}
    {init_article name="article" id=$articles->id}
    <div>{$article->buttons}{$article->body}</div>
{foreachelse}
    {$footer_articles_newbutton}
{/foreach}

The parent_system_alias="system" puts the object under the System section of current language. The System section is always available and is a different for each language. Also objects under this section do not appear in the site search results or sitemap.

The position is used to keep articles (or other objects) apart from those already under that section. So for each case (footer, header, side banners) use different position.

 

Site development

About Saurus API / Creating page template tutorial / Creating content template tutorial / Applying custom design to page template checklist / Moderated comments / Stationary articles (header, footer etc) / First, last and n'th item in a foreach loop / Creating zebra tables (cycling values) / Site and Article editor CSS styles / How to set up website aliases / Customising v-shaped editor buttons / Using PHP in templates / Exchanging variables between templates and PHP / Profiles and Custom Assets / Site languages / Printer friendly pages / Enabling browser cache / Creating WAP pages / Configuring sitemap / Saurus 4.1 technical notes