Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
hi all,
have a question,
i have:
Code: Select all
<cms:template title='Kambariai' clonable='1'>
   
   <cms:editable name="dropdown" opt_values='KAMBARIAI IR APARTAMENTAI=kambariai | KAMBARIAI VILOJE=vila' type='dropdown' order='1' />

   <cms:config_list_view>
      <cms:field 'k_page_title' header='Page name' />
      <cms:field 'dropdown' header='Tipas' />
   </cms:config_list_view>

</cms:template>


and at admin panel in list columns and row i have value, not label name "one" or "two"

how to get labels name ? not value

for example i created screenshot with explanation
Image
Image
Hi,

@trendoman made a feature request some time back to also make the 'key' of dropdown/checkbox/radio types available along with the 'value'. Maintaining backward compatibility wouldn't permit making any major change to the way these types work currently so we agreed upon creating a tag that would fetch the 'key' from the selected value.

I am sorry but I haven't had an opportunity yet to code that tag. So, for now you may try using the following code in your template -
Code: Select all
<cms:config_list_view>
    <cms:field 'k_page_title' header='Page name' />
    <cms:field 'dropdown' header='Tipas'>
        <cms:if dropdown='kambariai'>
            KAMBARIAI IR APARTAMENTAI
        <cms:else_if dropdown='vila' />
            KAMBARIAI VILOJE
        </cms:if>
    </cms:field>
</cms:config_list_view>

Hope it helps.
2 posts Page 1 of 1