Hi Everyone,
I'm new to drupal and this is my first post in the forum. I've searched long and hard for an answer to this and I haven't found anything. I apologize in advance if maybe I didn't search long enough or used the proper keywords to get the answer I'm looking for.
Here is what I'm trying to do.
I'm using 4.7, apache, and a MySQL database, I'm developing my own theme and have based it on the phptemlate engine. For this theme I've got a menu and I've customized the menu_tree, menu_item, and menu_item_link functions to return my menu in an unordered list (so I can style it to the design I've been presented with).
What I'd like to do is be able to find out where I am in the menu array each time the menu_item function gets called. I need to know if I'm at the first index of the array, in the middle or at the end of the array (because I need to spit out different HTML code depending on where I am).
Here is an attempt at an example of what I'm trying to get as an end result:
I've got a menu I've called Main_Nav, simple enough array.. should be something like:
Main_Nav["Home","About Us","Forum","News","Contact Us"]; (though I'm sure it's multi-dimensional and significantly more complicated than that, but you know what I mean)
Drupal builds this: