Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Use a different theme/template for Admin

Aloittaja groggu, kesäkuu 21, 2006, 04:00:40 IP

« edellinen - seuraava »

groggu

Hi,

I'm setting up a theme that matches a customer's website.  The content area is narrow, but works OK for browsing and using the forums.  The problem is that the content area is too narrow for the Admin pages.  Is there any way to specify a template for the admin area that does not use index.template.php (say an admin.template.php?)   OR can I use a different theme just for the admin pages?

Thanks!
GregC

Harzem

We may edit the template so that in the admin panel, it gets larger. Do you know the code to set the width in the template?

groggu

Hi Thanks for the reply,

I'm still pretty new at this, so I'm not certain what you mean.  I can code the HTML, CSS & PHP to create the page I want, but, the layout that I need to setup in index.template.php wraps around the content area. There is a left side navigation area that used thoughout the site and my client wants in the forums area as well, so that's why I have it in the template.  I'd like to eliminate that navigation area just for the admin screens.

GregC

bloc

Simply look at index.template.php and the function template_menu(). You will see that "current" section of the forum is in a variable. Its used to decide which tab-button will highlight. You can simply use that variable and check if its set to "admin", and if its not, render the navigation. Something like:


  if($context['current_action'] != 'admin')
     echo 'your-html-code-for navgigation-here' ;

Advertisement: