MyBB Community Forums

Full Version: a global template to change layout globally?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm just getting into myBB themeing, and I think I have it sussed with the theme part (CSS), but I need confirmation about templates.

I changed the index template under 'index page templates', but those changes only seem to affect the home page, is that right?

I created a template set when I crated a new theme and made reference to the template set in the theme properties page.

when I click on links to forums or calendar, the changes I made in the index template don't appear (only home page), so do I have to change an index template for each template section? There are a lot of these which makes it a daunting task.

Also if the above is the case, I take it I cant just copy and paste from the index template?
Take a look here to learn how to design/make a MyBB theme.

Link: http://community.mybb.com/thread-109137.html

Also, use the document linked below as a guide.

Link: http://docs.mybb.com/Admin_CP_Themes.html
(2013-08-30, 11:12 AM)Orbius Wrote: [ -> ]I'm just getting into myBB themeing, and I think I have it sussed with the theme part (CSS), but I need confirmation about templates.

I changed the index template under 'index page templates', but those changes only seem to affect the home page, is that right?

I created a template set when I crated a new theme and made reference to the template set in the theme properties page.

when I click on links to forums or calendar, the changes I made in the index template don't appear (only home page), so do I have to change an index template for each template section? There are a lot of these which makes it a daunting task.

Also if the above is the case, I take it I cant just copy and paste from the index template?

The "index page", in this context, is the forum home page, or the forum index page.

To make changes to the theme globally, you will want to edit the "Header Templates > Header" template, and the "Footer Templates > Footer" template.

Other templates which you may find useful/important to edit:

"Navigation > Nav" And "Ungrouped > Headerinclude". These templates are all used globally by the theme, whereas the "index" template you have edited, is only for the index page.
Thanks ESR360.

I have read through the template docs but I couldnt see the information I was looking for.

Can you tell me what the function of "Ungrouped > Headerinclude" template is?

also to clarify, if I wanted to change say add a <div> at the top of all pages that can be viewed, is there one template I would place those divs?
(2013-08-30, 12:45 PM)Orbius Wrote: [ -> ]Thanks ESR360.

I have read through the template docs but I couldnt see the information I was looking for.

Can you tell me what the function of "Ungrouped > Headerinclude" template is?

also to clarify, if I wanted to change say add a <div> at the top of all pages that can be viewed, is there one template I would place those divs?

Yes, you would place those divs in the "Header Templates > Header" template. Exactly where would depend on where you wanted the divs to display. If you put them at the bottom of the template, they would apear underneath the navigation/breadcrumb menu (the one which is like "MyBB Community Forums / Resources / Themes and Templates / Support / a global template to change layout globally? "). Similarly, if you want to place a <div> at the bottom of every single page, you would add it in the "Footer Templates > Footer" template.

The Headerinclude template is a global template which contains links to css files, javascript files etc. Given the sort of things youre trying to do, you probably don't need to use it.
Thanks again ESR360

That advice on the header and footer has made things much clearer now.

I also know to use headerinclude if I want to add any javascript or link to any jquery