User Tools

Site Tools


de:components-depending-on-the_page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
de:components-depending-on-the_page [2014/03/15 16:27]
Lars [Komponentes in Abhängigkeit einer Seite]
de:components-depending-on-the_page [2014/05/03 23:01]
Lars [A System for Different Components on Different Pages]
Line 51: Line 51:
 ?></​file>​ ?></​file>​
  
-Make a component which will be the default component and call it say //​default//​. ​Make components for specific pages and name them to include the page slug of the page into which they are to be inserted, so name them say //​content-about//​ and //​content-contact//​. Then call the component in your page template as follows:+Createa ​component which will be the default component and name it //​default//​. ​Create ​components for specific pages and name them to include the page slug of the page into which they should ​inserted, so name them e.g //​content-about//​ and //​content-contact//​. Then trigger ​the component in your page template as described:
 <code php> <code php>
 <?​php ​ if (component_exists('​content-'​.get_page_slug(false))) <?​php ​ if (component_exists('​content-'​.get_page_slug(false)))
de/components-depending-on-the_page.txt · Last modified: 2014/05/03 23:02 by Lars