Hey guys. This is an easy one.. but I'm struggling..
Im trying to display news story thumbnails based on the "category" assigned to the story (awards, academic, community..ect). So I need to be able to get this value chosen by the admins.
simply lists all of the values one after the other... which is not what I need.. How do I JUST get the 1 selected value (example: Awards)??. Once I get that value I should be able to use that to control which thumbnail image shows up... thanks..
I'm still pretty noob-y so a full code example would be appreciated.. THANKS GUYS!
Ok... just so I make sure I am looking at the right values... this first screen shot is my DataType.. which when I hover over it gives me the '5002' id
This next shot shows the Document Type.. where I am calling the DataType and have assigned the alias "categoryThumbnail" to it..
If you change the code to something like the following then you will be able to see how the data is stored/accessed and then might be able to see what the problem is with the "if" not matching:
id = [329] value = [Academics]
id = [326] value = [Awards]
id = [327] value = [Community]
id = [328] value = [Research]
id = [330] value = [Video]
id = [331] value = [Other]
selection = []
Not sure why I'm not getting anything as the "selection" value
Display Dropdown Value in Template
Hey guys. This is an easy one.. but I'm struggling..
Im trying to display news story thumbnails based on the "category" assigned to the story (awards, academic, community..ect). So I need to be able to get this value chosen by the admins.
simply lists all of the values one after the other... which is not what I need.. How do I JUST get the 1 selected value (example: Awards)??. Once I get that value I should be able to use that to control which thumbnail image shows up... thanks..
I'm still pretty noob-y so a full code example would be appreciated.. THANKS GUYS!
Hi,
My XSLT is getting a bit rusty now, so syntax might not be exact, but I think you want something like this:
HTH
Matt
Ok... just so I make sure I am looking at the right values... this first screen shot is my DataType.. which when I hover over it gives me the '5002' id
This next shot shows the Document Type.. where I am calling the DataType and have assigned the alias "categoryThumbnail" to it..
So with your code should it be?:
I'm not getting an error.. but not getting anything output either..
Hi
If you change the code to something like the following then you will be able to see how the data is stored/accessed and then might be able to see what the problem is with the "if" not matching:
Again, just typed it in direct here, so might be a format error or two.
Matt
Well this is what was output:
Not sure why I'm not getting anything as the "selection" value
Hi, did you get this sorted? Just come accross this thread again!
Hi ,
I am trying to get the DD selected value in XSLT.
Tried above code it renders the list of prevalues not providing selected value.
Can you help please in getting SELECTED VALUE from DD.
THanks ,
Abhijeet
is working on a reply...