Add small arrow image after each 1st level nav item

Tom Burman

im working with magentos main navigation and i would like to simply add an arrow image aftger each of the 1st level menu items. This should be a simple thing but i cant work out how to do it.

I have copied nafigation.phtml into my local mage file and chnage it from this:

 $html[] = $htmlLi;

    $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.'>';
    $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
    $html[] = '</a>';

To this, to test it:

 $html[] = $htmlLi;

    $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.'>';
    $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
    $html[] = '<span>Hello World</span>';
    $html[] = '</a>';

But no changes get made and i don't see hello world after the menu items.

Any help will be much appreciated, thanks

Lucian

This can be simply done with CSS but you need to show me the HTML output aside the PHP code.

If your menu items are generated something like this:

<ul class="menu-items">
   <li>Item 1</li>
   <li>Item 2</li>
   <li>Item 3</li>
</ul>

Then you can use one of these:

http://www.w3schools.com/cssref/sel_firstchild.asp

http://www.w3schools.com/cssref/sel_first-of-type.asp

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Get Add block after 1st image using preg_replace_callback PHP

From Dev

Add double quotes to 1st occurrence of = after delimiter | in a file

From Java

How to enforce 2nd level of pandas dataframe to add up to 1st level?

From Dev

Page with multiple image modals aren't loading images after 1st modal

From Dev

ASP.NET Repeater Item add divider after each row

From Dev

Android add arrow image to spinner

From Dev

image for nav bar button item swift

From Dev

Trying to add a dropdown item on existing nav

From Dev

.each only working on 1st selectbox

From Dev

Add an arrow to a dropdown to indicate it's a hover item

From Dev

Foreach(){} stops after 1st row

From Dev

Disable GetTouch after 1st touch

From Dev

Add image to item (spinner)

From Dev

Add image to item (spinner)

From Dev

add small image to large image for oclMat in openCV

From Dev

Add a link to each image

From Dev

Add +1 to each item in a comma-separated string in pandas dataframe

From Dev

how to add 1 to a value each time a new item is inserted SQL

From Dev

Place arrow image directly after sentence in paragraph

From Dev

How can I add another level to this responsive horizontal nav?

From Dev

Add flag to each item in list

From Dev

hover on nav arrow not working

From Dev

Restricting the addition of nodes of a JTree except for the 1st level child

From Dev

Restricting the addition of nodes of a JTree except for the 1st level child

From Dev

d3 Grouped Chart 1st level not looping

From Dev

How can I add a button after each list item in a Jade loop?

From Dev

How can I add a button after each list item in a Jade loop?

From Dev

How do I add a fixed text before and after each item of a list in a txt file?

From Dev

Binding listbox to ObservableCollection works only for the 1st item

Related Related

  1. 1

    Get Add block after 1st image using preg_replace_callback PHP

  2. 2

    Add double quotes to 1st occurrence of = after delimiter | in a file

  3. 3

    How to enforce 2nd level of pandas dataframe to add up to 1st level?

  4. 4

    Page with multiple image modals aren't loading images after 1st modal

  5. 5

    ASP.NET Repeater Item add divider after each row

  6. 6

    Android add arrow image to spinner

  7. 7

    image for nav bar button item swift

  8. 8

    Trying to add a dropdown item on existing nav

  9. 9

    .each only working on 1st selectbox

  10. 10

    Add an arrow to a dropdown to indicate it's a hover item

  11. 11

    Foreach(){} stops after 1st row

  12. 12

    Disable GetTouch after 1st touch

  13. 13

    Add image to item (spinner)

  14. 14

    Add image to item (spinner)

  15. 15

    add small image to large image for oclMat in openCV

  16. 16

    Add a link to each image

  17. 17

    Add +1 to each item in a comma-separated string in pandas dataframe

  18. 18

    how to add 1 to a value each time a new item is inserted SQL

  19. 19

    Place arrow image directly after sentence in paragraph

  20. 20

    How can I add another level to this responsive horizontal nav?

  21. 21

    Add flag to each item in list

  22. 22

    hover on nav arrow not working

  23. 23

    Restricting the addition of nodes of a JTree except for the 1st level child

  24. 24

    Restricting the addition of nodes of a JTree except for the 1st level child

  25. 25

    d3 Grouped Chart 1st level not looping

  26. 26

    How can I add a button after each list item in a Jade loop?

  27. 27

    How can I add a button after each list item in a Jade loop?

  28. 28

    How do I add a fixed text before and after each item of a list in a txt file?

  29. 29

    Binding listbox to ObservableCollection works only for the 1st item

HotTag

Archive