Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: groggu - kesäkuu 21, 2006, 04:00:40 IP

Otsikko: Use a different theme/template for Admin
Kirjoitti: groggu - kesäkuu 21, 2006, 04:00:40 IP
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
Otsikko: Re: Use a different theme/template for Admin
Kirjoitti: Harzem - kesäkuu 21, 2006, 04:27:48 IP
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?
Otsikko: Re: Use a different theme/template for Admin
Kirjoitti: groggu - kesäkuu 21, 2006, 09:54:03 IP
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
Otsikko: Re: Use a different theme/template for Admin
Kirjoitti: bloc - kesäkuu 22, 2006, 05:46:34 AP
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' ;