Primary Links as images in Drupal 5

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

Worked out a solution to a post on drupal.org by generating text links then replacing the primary links constructor in page.tpl.php theme template with modified code from the source

http://drupal.org/node/268732

and then there were other suggestions that appear to require mods to core code - "forking"

what do you think?

greg's picture

He has: 1,581 posts

Joined: Nov 2005

netsperience wrote:
what do you think?

I'm all out of Blue Peter badges

(Sorry, couldn't resist Laugh)

Shouldn't everyone be heading to Drupal 6 by now?

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

original post on d.o. was specific to Drupal 5

I believe my solution would work in v 6 too

I am using both Drupal 6.2 and Drupal 5.7

The "consensus" is that 5.7 is a better pick still for "serious" development due to more module support (many module maintainers are taking along time to release v 6 probably because of the new menu system etc)

Some reasons I would choose v 5.7:

1) Ubercart for ecommerce
2) Workflow-ng (this amazing module not in v 6 yet either)

and there are many bugs in v 6 modules, eg login_destination someone (not maintainer) made a temporary replacement that works in most v 6 installations

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

After much discussion that was sneering (at d.o. not here - we're nicer here) (example: "Let's Party Like It's 1999") but did not quite address the original post I was able to come up with this css solution that does not require any alteration of php code in template or core:

I think this is it
netsperience - June 29, 2008 - 15:44

using

ul.primary-links a {
background-position:center top;
background-repeat:no-repeat;
height:0px !important;
overflow:hidden;
padding:32px 0pt 0pt;
}

the text is gone but the Garland theme bg images are still there

so to replace the bg images - for each menu item (example here is in Garland theme)

ul.primary-links li a.menu-1-1-2 {
background: transparent url(images/bg-bar.png);
}

(make sure it is placed after the css that sets the theme bg images, if any)

This is a css solution I can live with, thanks all for the suggestions

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.