Jump to content

How can I highlight a menu to show the user what they've selected pls ?


Recommended Posts

Hi - This sounds like an easy thing to change, but I'm still a beginner and the site uses extra code that comes into play if I log in as admin to add new songs etc. (rather than just browse it) , so it's a bit confusing and complicated when I try to edit it.

 

Here's what I'm having trouble with...

 

My site shows a list of different musical styles (genres) on the left, that first appear in 'home.php'

This list is all coloured the same shade of blue.

 

When the user clicks a genre in that list, you're taken to 'listing.php' - this shows a list of songs relating to the genre that you clicked.

I'd like the chosen genre to be highlighted in the list with a lighter blue, so the user can see which genre they are looking at, until they've selected a different genre.

 

I've highlghted the links to the different pages on the site, and even coloured the corresponding graphic music note myself - but the coding for this list is difficult to interpret due to the extra 'admin only' code, and I'm a complete beginner.

 

I appreciate any help, as I've spent hours trying to find where to change the colour, and finally realise it's not as easy as I thought.

 

The site is www.makin-trax.co.uk

 

If anyone needs the code I can email it if that will help, or I can copy and paste it here if it will fit.

 

Thanks

 

UkTab

Just make a new CSS class and set the current selection to that CSS class instead of the normal one.  Can I see the menu code? (Please only the relevant code, not 17 files that don't even pertain to this.  You'd be surprised at what people post here.)

Sorry everyone - I meant to say that I know about IF THEN (I used to program in BASIC a long time ago) !

 

The problem isn't knowing how to change the colour - the problem is finding the 'chosen' genre in the code. There doesn't seem to be a part of the code that holds the variable anywhere !

 

Darkwater - what's the best way to get the code to you (or anyone) ?

Minase - thanks, but the problem is that the code doesn't contain anything like ($_GET['gid']) == "Ambient_Chillout") { (or any other genre !)  ???

 

The only $_GET variables are when I want to add, alter or delete a song

:-[

in listing.php change code

<a href="listing.php?gid=Abstract_Experimental">Abstract / Experimental</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Ambient_Chillout">Ambient / Chillout</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Big_Band_Swing">Big Band / Swing</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Dance_Disco">Dance / Disco</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Film_Game_Scores">Film / Game Scores</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Hip_Hop_Rap_Urban">Hip Hop / Rap / Urban</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Trip_Hop">Trip Hop</a> <img src="images/dot.jpg"><br>

with

<?php
$menu = '<a href="listing.php?gid=Abstract_Experimental">Abstract / Experimental</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Ambient_Chillout">Ambient / Chillout</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Big_Band_Swing">Big Band / Swing</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Dance_Disco">Dance / Disco</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Film_Game_Scores">Film / Game Scores</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Hip_Hop_Rap_Urban">Hip Hop / Rap / Urban</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Trip_Hop">Trip Hop</a> <img src="images/dot.jpg"><br>';
if ($_GET['gid']) $menu = str_replace('?gid='.$_GET['gid'], '?gid='.$_GET['gid'].'"  style="color:red;',$menu);
echo $menu;
?>

Minase thinks the changes are actually in menu-search.php

 

Standard menu colour should be #333366. Highlighted colour should be #0066FF

 

I sent Minase a copy with the colours needed but they're offline now. If anyone else wants to check it for me, it's

<!--a href="listing.php">ALL</a> <img src="images/dot.jpg"><br--> <a href="listing.php?gid=Abstract / Experimental">Abstract & Experimental</a> 
<img src="images/dot.jpg"><br>
<a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=A capella">A capella</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Ambient / Chillout">Ambient & Chillout</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Big Band / Swing">Big Band & Swing</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Blues">Blues</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Classical %26 Orchestral">Classical & Orchestral</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Dance / Disco">Dance & Disco</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Film / Game Scores">Film & Game Scores</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Folk">Folk</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Hip Hop / Rap / Urban">Hip Hop, Rap & Urban</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Latin">Latin</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Psychedelic">Psychedelic</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Punk">Punk</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=R %26 B">R & B</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Ska">Ska</a> <img src="images/dot.jpg"><br>
<a href="listing.php?gid=Trip Hop">Trip Hop</a> <img src="images/dot.jpg">

 

Thank you !

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.