+2

Expanding the class CSS to individual links on menus

W. Rags. 6 years ago in BLOX CMS updated 6 years ago 4

Allowing for a simple class='' option on each menu link.  Once that option is available, then it will be up to the end-user (us) to define the class within your system, and chose to use it on the link.  Updating would be as simple as changing the class name on the link in the editor.


You already do this for each 'block'.  It just needs extending to the links within the menu blocks.  Fairly simple feature, and one that wouldn't impact much on your system, but it would bring a lot of flexibility to the entire system, especially if you extended it to other items as well.  Each 'item' (html entity) then has a class='' field that contains a user managed variable that could be controlled in your editor.  I can imagine some very fancy work done, using this alone, and without you having to do anything extra after implementation.

Do you mean in the nav regions and some blocks with menus?


If I recall right, you can add a <span> with a class in the link text, and it renders as HTML (with the class). You could try it that way and see if it works.

I mean on the individual a href='' tags.  I know I can do it on a region, but I am seeing a more fine-tuned option. 

Example:


<features menu area>

Home Outdoors Bridal HowTo


I want to highlight JUST the Bridal link,  Since I can only "add links" with no CSS or class options for the link, all the links show the same.  if there was a class or style field available for that link I could add a class of "highlight" and then with the CSS I have already created and added to the system, it would highlight that one item:


<features menu area>

Home Outdoors Bridal HowTo


Though I would use color instead of bold, italics, and underline.


Wm

HI Wm!


I didn't mean the region. I think you can replace Bridal with <span class="bridal">Bridal</span> (or something like that), and it will work.

the <span class=""> works, but requires a constant editing of each link for 'specials' and such.  I was hoping for a class field for links, just like BLOX does for each block.  This would allow us to fine-tune it with predefined classes.  Ticket opened over this has been answered and classes added.  We still have to use the <span class=''> tags but it does help cut down on the code needed updating each time we change a link from one type of highlight to another.