Page 1 of 1 [ 8 posts ] 

Madbones
Veteran
Veteran

User avatar

Joined: 7 Mar 2010
Age: 28
Gender: Male
Posts: 777
Location: In the zone

15 Oct 2012, 12:35 pm

Hey!
I have been doing alot of web dev recently with myBB.
I have noticed these HTML tags like this: {header}. That would basicly insert some code from an external HTML file. How is this done?
Thanks!


_________________
?Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.? -Steve Jobs.


Robdemanc
Veteran
Veteran

User avatar

Joined: 30 May 2010
Age: 48
Gender: Male
Posts: 2,872
Location: England

15 Oct 2012, 3:04 pm

Are you talking about CSS and html? You can use the {} in html to define style elements to your page? But its better to do it in CSS files.



Madbones
Veteran
Veteran

User avatar

Joined: 7 Mar 2010
Age: 28
Gender: Male
Posts: 777
Location: In the zone

15 Oct 2012, 3:05 pm

Robdemanc wrote:
Are you talking about CSS and html? You can use the {} in html to define style elements to your page? But its better to do it in CSS files.

Yeah HTML and CSS.
Is there anyway to have all the elements of my website in seperate HTML files?
For example: I dont want to have to make 1 update to my header on one page then have to do all the other pages.
Any ideas?
Thanks!


_________________
?Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.? -Steve Jobs.


LookTwice
Velociraptor
Velociraptor

User avatar

Joined: 30 Oct 2011
Age: 113
Gender: Male
Posts: 441
Location: Lost, somewhere

15 Oct 2012, 3:28 pm

That's not part of HTML but of some sort of template language - probably used within some sort of CMS or Web framework. I don't know which one that is though. Examples would be Ruby on Rails, ASP.NET, CakePHP.


_________________
What goes on inside is just too fast and huge and all interconnected for words to do more than barely sketch the outlines of at most one tiny little part of it at any given instant. - D.F.W.


Robdemanc
Veteran
Veteran

User avatar

Joined: 30 May 2010
Age: 48
Gender: Male
Posts: 2,872
Location: England

16 Oct 2012, 2:03 pm

Madbones wrote:
Robdemanc wrote:
Are you talking about CSS and html? You can use the {} in html to define style elements to your page? But its better to do it in CSS files.

Yeah HTML and CSS.
Is there anyway to have all the elements of my website in seperate HTML files?
For example: I dont want to have to make 1 update to my header on one page then have to do all the other pages.
Any ideas?
Thanks!


If by updates you mean the color of the text, font family, size, borders etc then you can just put these definitions in a CSS file and then you only have to update the CSS file to change all HTML pages that use that CSS file.



Madbones
Veteran
Veteran

User avatar

Joined: 7 Mar 2010
Age: 28
Gender: Male
Posts: 777
Location: In the zone

16 Oct 2012, 2:06 pm

Robdemanc wrote:
Madbones wrote:
Robdemanc wrote:
Are you talking about CSS and html? You can use the {} in html to define style elements to your page? But its better to do it in CSS files.

Yeah HTML and CSS.
Is there anyway to have all the elements of my website in seperate HTML files?
For example: I dont want to have to make 1 update to my header on one page then have to do all the other pages.
Any ideas?
Thanks!


If by updates you mean the color of the text, font family, size, borders etc then you can just put these definitions in a CSS file and then you only have to update the CSS file to change all HTML pages that use that CSS file.

I mean like HTML and what not. Sounds like Il have to use a templating framework.
One of my sites consists of over 30 files, so its quite tedious to update the design if needed :lol:


_________________
?Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.? -Steve Jobs.


LookTwice
Velociraptor
Velociraptor

User avatar

Joined: 30 Oct 2011
Age: 113
Gender: Male
Posts: 441
Location: Lost, somewhere

16 Oct 2012, 2:19 pm

You can use SSI (link) as well.


_________________
What goes on inside is just too fast and huge and all interconnected for words to do more than barely sketch the outlines of at most one tiny little part of it at any given instant. - D.F.W.


StuartN
Veteran
Veteran

User avatar

Joined: 20 Jan 2010
Age: 61
Gender: Male
Posts: 1,569

17 Oct 2012, 7:39 am

Madbones wrote:
I mean like HTML and what not. Sounds like Il have to use a templating framework.
One of my sites consists of over 30 files, so its quite tedious to update the design if needed :lol:


You can use client-side include with an iframe, which is best placed within a div for styling, or a server-side include if your server supports it.