...

View Full Version : Template Inheritance Using JavaScript



Pervez
11-09-2012, 07:19 AM
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

sunfighter
11-09-2012, 03:20 PM
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:

<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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum