======Komponentes in Abhängigkeit von einer Seite ====== =====Komponente auf genau einer Seite anzeigen===== Soll eine Komponente auf genau einer Seite angezeigt werden, kann diese einfach im Template (z.B. im Stadard-Template **template.php**gesteuert werden: Hinweis: Unbedingt **PAGE** mit dem konkreten SLUG-Namen und **COMPNAME** mit dem konkreten Komponentennamen ersetzen. ===== Komponente in Abhängigkeit einer übergeordneten Seite ===== Um eine Komponente in Abhängigkeit einer übergeordnete Seite (Parent) zu landen reicht folgender Eintrag im Template aus. Hinweis: Unbedingt **PAGE** mit dem konkreten SLUG-Namen und **COMPNAME** mit dem konkreten Komponentennamen ersetzen. ===== Bestimmte Komponenten NICHT laden ===== Um auf bestimmten Seiten die ein oder andere Komponente NICHT zu laden, ist "**==**" mit "**!=**" im oberen Code zu ersetzen. =====A System for Different Components on Different Pages===== The Components might contain a header image, sidebar content, tagline text, anything. If you only want one page to be different it might be simplest to just make a duplicate page template, but if you want them different on each of several pages here is how. The following text needs to be in a functions.php file in your theme folder: item; } else { $components = array(); } } $exists = FALSE; if (count($components) > 0) { foreach ($components as $component) { if ($id == $component->slug) { $exists = TRUE; break; } } } return $exists; } } ?> Create a 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: ======Links====== Back to the GetSimple Wiki [[:start|Contents Page]] ===How to Have Different sidebars=== [[http://mvlcek.bplaced.net/how-to/sidebars/]]