Ian--

By default, the selected value of an option list element on a page is saved
as GUID, instead of the string that corresponds to the GUID.

So what you are getting is pretty normal. To find out the correspondence
between GUID and the string it represents, you would have to "load" (in the
RQL sense) the element against the content class.

An easy hack is to just get the "name" of the option list -- if you keep the
"name" and the "value" as the same string.

If you cannot keep them the same, let me know and I will suggest something
else.

Henry Lu

On Fri, Jul 24, 2009 at 4:55 AM, Ian <[email protected]> wrote:

>
> Hi all,
>
> I have a content class, which I can hook up to foundation page.  In
> part of the template, I want one of two sections of HTM to be
> outputted, depending on a defined choice for that instance.
>
> To accomplish this, I thought it would be nice to define an option
> list for the content class, and give it two values, say 'type1' and
> 'type2', and define some code as follows:
>
>
>
> <reddot:cms>
>        <if>
>                <query valuea="Context:CurrentPage.Elements.GetElement
> (opt_Type).Value" operator="==" valueb="type2">
>                        <htmltext>
>                                <p>some HTML in here</p>
>                        </htmltext>
>                </query>
>                <query type="else>
>                        <htmltext>
>                                <p>some other HTML in here</p>
>                        </htmltext>
>                </query>
>        </if>
> </reddot:cms>
>
> However, Context:CurrentPage.Elements.GetElement(opt_Type).Value does
> not seem to be returning a value, and I have also tried
> Context:CurrentPage.Elements.GetElement(opt_Type).GetHtml().  I have
> also tried outputting these values on the page with either of:
>
> <%!! Context:CurrentPage.Elements.GetElement(opt_Type).Value !!%>
> <%!! Context:CurrentPage.Elements.GetElement(opt_GetHtml()).Value !!%>
>
> neither of which print a value into the page.  Is what I am trying to
> accomplish not possible, or is there something wrong in the way I am
> trying to do it?  I could use a standard field which the user could
> populate, but it would be nice if I could have the user select a value
> from an option list, as it would be far more user friendly, and less
> error prone :)
>
> Any pointers would be appreciated!
>
> Ian
> >
>


-- 
646-807-8683

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to