Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-09-2012, 06:19 AM   PM User | #1
Pervez
New Coder

 
Join Date: Jul 2012
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Pervez is an unknown quantity at this point
Template Inheritance Using JavaScript

Hi,

I saw in Django framework , in there we can inherit the templates from common base.html.

In base.html all the common things are defined , And in other templates content of the pages are changed .

I just want define all common div's like header , footet and nav in base.html and extend this base.html in other pages with different content in page .

Thank You
Pervez is offline   Reply With Quote
Old 11-09-2012, 02:20 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
You write your main style sheet as an external file, lets say we name it basestyle.css and place it in the css folder. Now we can call it for every page we want to use it on like this:
Code:
<link href="http://www.somesite.org/css/basestyle.css" rel="stylesheet" type="text/css" />
Make it the first call and follow it with a call to the css file for that page.

This has nothing to do with javascript. It's just normal HTML/CSS.
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Tags
javascrip, templates

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:27 PM.


Advertisement
Log in to turn off these ads.