Includes within the templates

Creating and using includes — reusable code segments — makes it easier to maintain your templates. In general practice, certain segments of the HTML pages on your site are identical, regardless of the type of page. This is often the case when displaying a portfolio of images, for a navigation menu, for keywords attached to a section or an article, for meta tags in the HTML body, or footer text and links at the bottom of each page.

Any existing SPIP template code can be included within another using the following syntax:

<INCLURE{fond=file_name}{passed parameters} />

Typically, the only parameters passed are the current or a specific id_rubrique, id_article or similar identifier, the current or a specific language code, or the keyword “doublons” to permit a data context to recognise an overlapping environmental data duplication.

Author Mark Baber Published : Updated : 12/03/23

Translations : English, français, Nederlands