Codepaste - Details |
Weitere Infos zum Codepaste |
Name | Different templates per mod/action | ||
Autor | Mindcrime | ||
CMS-Version | ClanSphere 2008 | ||
Datei | index.php | ||
Datum | 26.11.2008 um 17:31 Uhr | ||
Beschreibung | This is just a quick hack for being able to switch to different main templates depending on the module and action that was taken. Depending on the mod and/or action use a different template than the default index.htm if set in the file system/runstartup/mod_template.php. The file system/runstartup/mod_template should look like this (just an example and these index2.htm and index3.htm should exist in your templates/YOU_CHOSEN_TEMPLATE directory): <?php global $cs_mod_templates; /* * If the value of the mod key is not an array => use that template for all actions * If the value of the mod key is an array, only use that template for that mod and that specific action */ $cs_mod_templates = array( 'access' => array('manage' => 'index2.htm'), 'affiliates' => 'index2.htm', 'board' => 'index2.htm', 'clansphere' => 'index2.htm', 'database' => 'index2.htm', 'explorer' => 'index2.htm', 'wars' => array('edit' => 'index2.htm', 'manage' => 'index2.htm'), 'news' => array('create' => 'index2.htm', 'edit' => 'index2.htm', 'manage' => 'index2.htm'), 'users' => array('home' => 'index3.htm') ); ?> In our example we use index2.html to have more space available for content (board/forum needs more width) while index3.html is used for showing some members / logged on only stuff that you don't wont to show on other pages... |
||
Alter Code | Alter Code
|
||
Neuer Code | Neuer Code
|
||
Zurück - Übersicht |
Bitte Login benutzen, um Kommentare zu schreiben. |