Hopesomeonecan helpme findasolutionto this problem.
I use Umbraco version 4.5.2
Ihaveamainmenu whereIwanteach menu itemto haveits own color.
I have createdtwo fieldsinadocument type, where youcan specifytwo colors.
Mystructurelooks like.
frontPage -Item1 -Item2 -Item3 -Item4
Allthese menu itemsaremade of a specialdocumenttypenamedTop Menu.
My problemiscurrentlythat ifI putacolor on themenu item1gets allmenpunternethesamecolor is notdifferentcolors.Ertsecond problemisthat the colordoes not comeon the frontpage, becausecoloris put onTop Menudocumenttype.
I have a smallstartingpointandhopethat someone canguidemein the rightdirection.
Using the currentPage to get the colour, I would expect to create all of the links with the same colour, as specified on the current page. If you want the menu items to be different colours, then you will need to get the colour of the individual page. I would also recommend putting the styling into a style sheet (css), so just add a class to the a tag in the menu.
Different colored menu items
Hi,
Hope someone can help me find a solution to this problem.
I use Umbraco version 4.5.2
I have a main menu where I want each menu item to have its own color.
I have created two fields in a document type, where you can specify two colors.
My structure looks like.
front Page
- Item 1
- Item 2
- Item 3
- Item 4
All these menu items are made of a special document type named Top Menu.
My problem is currently that if I put a color on the menu item 1 gets all menpunterne the same color is not different colors. Ert second problem is that the color does not come on the front page, because color is put on Top Menu document type.
I have a small starting point and hope that someone can guide me in the right direction.
The macro is inserted on the main.master in a style tag inside the head tag
/Dennis
Could you try changing the a.mainMenu styling part to this:
I know it's not pretty, but it should give your the right output in your code I think. At least if the colors are set on the current page.
Does this help you creating the right output?
/Kim A
Dennis,
Using the currentPage to get the colour, I would expect to create all of the links with the same colour, as specified on the current page. If you want the menu items to be different colours, then you will need to get the colour of the individual page. I would also recommend putting the styling into a style sheet (css), so just add a class to the a tag in the menu.
Try to get all of the nodes with:
then loop through the item, and get the colour:
You will want to only list items at the top level, whereas this will list all pages on the site.
Ohh I was a bit to fast in my answer there Dennis. My Bad :)
Hi Richard and Kim,
Apologize for the late reply but just got home from vacation.
I will try to find a solution tomorrow on the job, and then I write how I choose to solve it.
But many thanks for inputs.
/Dennis
Hi again,
I got solved my problem today on the job.
I ended up with this solution. This is a simplified version
/Dennis
Hi, Dennis
You just asked what I want to know, the last code also give me a reference on my work.
Thank you so much.
linear bar code generation in asp.net
Best regards.
Mica Gordon
linear bar code reader in asp.net
is working on a reply...