Gazetteer in IE

The template doesnt look the same in IE (5.5) as it was in Firefox (1.0.5). The steel blue color on navigation tab needs a fix.

when i hover on the navigation tabs of capmex.biz in IE (again) the page just scrolls down (bug).

Submitted by Edgard Durand on August 6, 2005 - 22:46.

Unfortunately, IE versions prior to version 6.0 are not fully standards compliant.

I wouldn't worry too much about those versions, because they have intrinsic security risks and most people have already upgraded to the newer version.

As with all newer standards compliant designs, the Gazetter template should degrade gracefully in older browsers. This means that although it doesn't look exactly as it was designed, it is still usable.

I checked also the bug on capmex.biz (IE 5.x), it's related with the sliding doors technique and the relative positioning of the navigation div. However, I'm impressed that the design doesn't break more on IE version 5.x browsers.

Submitted by Gunny@www.drupal.org on August 7, 2005 - 09:56.

Tried the sliding doors technique with the code below in the phptemplate for styling primary links

<?php if (count($primary_links)) : ?>

<?php foreach ($primary_links as $path => $link): ?>

<?php print substr($link, 0, strpos($link, '>')+1) . "" . substr($link, strpos($link, '>')+1, strrpos($link, "<")-strpos($link, '>')-1) . '' ?>

<?php endforeach; ?>

<?php endif; ?>

The "current" selection is placed on the first tab (link) always. When i click on rest of the tabs the current selection doesnt move.

here is the output,

home

book

category

XYA

if there is a problem it should only be with . How did you get the sliding doors to work ?

Submitted by Edgard Durand on August 8, 2005 - 12:02.

I setup a new drupal installation to test your code. The php code works fine, I placed the code in file page.tpl.php, the current id changes according to the tab clicked.

I will be posting a variation of the Gazetter template with tabs using the sliding doors technique, and compatible with the above code, I just need to give the final touches to the template to add it to our free templates.

Submitted by Gunny@www.drupal.org on August 8, 2005 - 20:45.

I missed a point in my sliding doors post. Actually the code did work for me fine initially. But when i added url aliases (after enabling path module) for nodes, say for eg: node/1 (primary link) as Aboutus, i started experiencing the problem that i had posted before. Well, i believe the gazetter sliding doors template won't be drupal specific, but anyway will be useful for general audience. Was my php code similar to the one you used to get sliding doors work on this site ? otherwise you could share your php snippet.

Submitted by Edgard Durand on August 8, 2005 - 23:23.

It's very specific to my site configuration. It requires pathauto to add to every post a specific path according to the section. I was thinking of rewriting the code with the new version of phptemplate, but it works so fine that I have delayed the upgrade.

Anyway here's the code, remember that it's a hack:

<?php
$nav_test = substr($_SERVER['REQUEST_URI'], 1, 12);
$pos = strpos ($nav_test, "/");
$admintest = 0;
switch ($pos) {
case NULL:
if ($nav_test === "web-design.h") {
//web design
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
} elseif ($nav_test === "web-hosting.") {
//web hosting
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
} else {
//webmaster resources
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
}
case 9:
//webmaster resources
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
case 10:
//web design
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
case 11:
//web hosting
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
case 6:
//search
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
case 5:
//forum
if ($nav_test{0} === 'f'){
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
$admintest = 1;
break;
}
case 4:
//blog
if ($nav_test{0} === 'b'){
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
break;
}
default:
//none
print ' Webmaster Resources
Web Design
Web Hosting
Forums
Blog
Find';
$admintest = 1;
}
?>

What it does is to test a substring of the $_SERVER['REQUEST_URI'] variable for the position of the "/" character, for example (web design/) will be 10, then it passes the value to a switch statement to display the appropriate menu or in the case of NULL to an if statement.

Submitted by Gunny@www.drupal.org on August 9, 2005 - 00:49.

Good hack. The following link might be of your interest,
Horizontal Navigation Menus in Drupal Using CSS (Part Deux)

If you could able to solve the url alias problem in my sliding door technique snippet, please post it here.

Submitted by Edgard Durand on August 9, 2005 - 18:48.

I have added a new template based on the Gazetter, Sliding Doors Example.

I extended the tab concept to include three tab states (rollover effect only viewable in fully standards compliant browsers like firefox).