Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-07-14 00:54:00

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 549
Website

[SOLVED] my div navigation menu works in 4.8.2, but not on 4.8.8

Hello,

I use a div li menu for site navigation. My newer sites that uses theme 4.8.8, the menu only shows on the front page. I looked in Presentation admin menu, Sections. The Articles pages use Page type Archive. The menu I use doesn’t show there.

When I switch it to use default instead of archive, the menu shows, but it doesn’t pick up the style sheet for the menu.

The site is: Jim’s Starfinder site

On sites that have the 4.8.2 theme, the menu appears on all pages.

I tried copy and paste the default page over to archive page, it doesn’t load the style sheet.

Is there any way I can fix this ?

Offline

#2 2022-07-14 06:39:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,370
Website

Re: [SOLVED] my div navigation menu works in 4.8.2, but not on 4.8.8

Hi Jim,

In the code that produces your header, try replacing this part:

<link rel="stylesheet" type="text/css" href="menu.css">
<style>
body {behavior: url("csshover3.htc");}
#menu li .drop {background:url("graphics/drop.gif") no-repeat right 8px; 
</style>

with this:

<link rel="stylesheet" type="text/css" href="/menu.css">
<style>
#menu li .drop {background:url("/graphics/drop.gif") no-repeat right 8px; 
</style>

The only difference is a / in front on /menu.css and another / in front of /graphics/drop.gif. You can also drop the csshover3.htc behaviour as that hasn’t been needed since Internet Explorer 6 or so.

Explanation: On the regular page, the header calls domain.com/menu.css and domain.com/drop.gif and your menu and down arrow show. Currently, when you’re on an /articles/ subsection, the page adds the section to the mix, so it looks for domain.com/articles/menu.css and domain.com/articles/drop.gif and doesn’t find them. This is because the url paths for those files are relative to the current page.
Adding a slash at the beginning of the url says look immediately after the domain name, and makes the url paths to those files absolute (i.e. relative to the beginning of the site).


TXP Builders – finely-crafted code, design and txp

Offline

#3 2022-07-14 11:07:51

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 549
Website

Re: [SOLVED] my div navigation menu works in 4.8.2, but not on 4.8.8

Oh good. I can do that. Not convoluted at all.

Thanks !

Offline

#4 2022-07-14 14:31:44

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 549
Website

Re: [SOLVED] my div navigation menu works in 4.8.2, but not on 4.8.8

All fixed. Again, Thanks !

Offline

Board footer

Powered by FluxBB