|
Starhugger -> Displaying page title using CSS (9/27/2006 19:10:24)
|
Hi everyone! I'm finally starting to (gradually) convert my FP site into a CSS-only (or mostly) site. What I would like to do is to have a header area pulled into every page, using an include command (FP webbot for now, maybe SSI later). This way, if I change anything in the header, it will be automatically updated for all pages. The problem is that I want to have a different page title for each page appear in front of my banner background. But I'm not sure how to do that automatically, short of creating a different header for each page (which defeats the purpose of standardizing it). Right now I have my logo graphic in the upper left (which is a link to the home page). Then to the right of the logo is my page title banner background, which has text in front of it giving the page title (e.g., Articles) in <H1>. This allows the page title to be visible to all browsers and SEs, and gets the credit for being the most important heading. Then a navigation bar is put below these two areas. This is pulled in from yet another included block using an include. Here's the code so far: <div id="hdr-container">
<img border="0" src="images/hdrlogo.gif"
width="145" height="91" align="left"
title="Home Page" />
<div id="topbanner"><h1 class="bannertext">PAGE TITLE</h1></div>
<!--webbot bot="Include" U-Include="topnavbar.htm" TAG="BODY" -->
</div> I would like to have the included header area automatically get the "page title" text from the current page somehow. In other words, the Articles page would display "Articles" and the Dictionary page would display "Dictionary," etc. I can't figure out a way to set that up though. The alternative seems to be to create unique headers for each page, each with a hard-coded page title. But if I decide to change the logo filename, for instance, I would have to go through all pages and change each one manually. Defeats the purpose of the whole thing. I don't know enough about javascript to know if it will do this, but I'd prefer to avoid js for this, to make it accessible to non-js enabled browsers. I hadn't tried a search about this problem because I'm not even sure what keywords to look for. I haven't had time to tinker with the code side of things for a while, so there might be an easy way to do this and I just forgot. Any ideas? Thanks for your help with this! Starhugger
|
|
|
|