DeeKnows Homepage

Main menu:

DeeKnow’s Grotto
Thursday, 9 May 2002
Knocked out a Navigation generating PHP script (link)

Knocked out a Navigation generating PHP scriptlet to use on the Templates-2002 job. You can see it in action on this page where the nodal-navigation is an SSI call to the PHP script which in turn looks for a local_nav.html file in the same directory as the HTML page. It opens the navigation page (if it exists, and is readable) and parses the URL and label pairs (using a regexp) and presents the navigation.

The script doesn't bother linking the URL label if the filename matches the page currently being viewed (ie only siblings are linked). Check out the source in /php/dktest/navigation.php to see how it works.

The cool thing (I reckon) about this as a mechanism is that all the user has to do is manage a simple HTML page like this. The regexp should be pretty robust as far as ignoring markup thats incorrect or not required.

Plus because its scripted, we can change the presentation (e.g. use alternative CSS styles) or orientation of the links (e.g. to a horizontal nav list instead of vert)


7:08:39 PM  
Test SSI Layouts for new Templates  (link)

Test SSI Layouts for new Templates - Have knocked out a list of linked-thumbnail images of pages that use the SSI implementation of the new template guidelines and CSS styleshets. The content is identical on each page, but the parent SSI file is making on-the-fly changes to peripheral elements based ont he URL of the document requested. This would typically be on a per-major-directory (ie subsite) basis.


3:33:26 PM  

May 2002
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Apr   Jun

Todays Reading...
o Steam motorcycle
o UFO Area: Our Special Reports
o SOA Facts
o xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe
o Helen Clarks marijuana speech 1994 Waikato University


WhereAmI RSS

Subscribe with Bloglines

Boring Approved

 


published using...

 


To the Top Top Of Page    Home Home    emailContact Author     Validate    RSS/XML version