PHP to run GGL.o
I'm finally making some progress on the transition to DocBook - so now it's time to think about how to structure the content of GetGNULinux.org. The trick is to build each GGL page based on a core series of DocBook files.
Each page on GGL is structured as pictured in the file attached. There are six bits of information to put together.
1. HTML code header
Declaration, page title, link to CSS files, etc. Normally this should be generated by the program exporting DocBook into XHTML.
2. Translation "tabs" (flags top right of page)
This is by far the trickiest. Ideally the flags should not be integrated into the DocBook file.
We must pick up the code corresponding the the page displayed (say, the About page), so that the links to all translations are displayed. The tabs are the same on each translation of a given page. This could be done with a database.
Then we must "filter" the code, so that the tab for the current language is "highlighted" by adding an HTML tag.
3. Header picture (the pic with blue background)
Easy. Just find and display a "headerpic.php" file common to all the site
Find and display a "menu.php" file common to all the site;
"Filter" the content so that the current section is "highlighted" by adding an HTML tag.
5. Page content
Generated by the program exporting DocBook to XHMTL
Find and display a "footer.php" file common to all the site.
I have no idea how to pick up the correct translation flags for each page, dynamically. I don't know how to do the "filtering" either. So any hint/suggestion would be welcome.
Currently my idea of a given page would look like
stuff generated from DocBook file
Get_a_header_php_file that does:
Get_the_translation_tabs for the given page
Find language of given page and highlight tab
Find section the current page belongs to and highlight it
Content of page, generated from DocBook
I have little experience in this, does this sound sensible?