1
0
-1
Hi,
For the given Custom Type snippet below, is it possible to expose a property of a nested content field at the top level?
In this example, I'd like to expose the value of the label property of the itemTitle field:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<module name="Block-Custom-Item-Question" category="Santos" editable="true" embeddable="true" extends="Block-Standard" label="Item-Question">
<property name="layout" accesslevel="protected" value="grid,columns=2,column.widths=75% 25%"/>
<content>
<field name="itemTitle" styles="style.radiobutton.group.title" type="Text-Rich">
<setproperty name="layout.data" value="endline,span=2"/>
<setproperty name="label" value="&lt;item label here>"/>
<setproperty name="margin" value="1mm,0mm,3mm,0mm"/>
</field>

Basically I'd like to be able to set certain values when dropping this block into a form with needed to navigate to the specific node all the time.

Thanks
Sharon
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1
      1. Unknown User (support)
        Hi Sharon,
        Changes required to your original code are in bold below:

        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <module name="Block-Custom-Item-Question" category="Santos" editable="true" embeddable="true" extends="Block-Standard" label="Item-Question">
        <property name="layout" accesslevel="protected" value="grid,columns=2,column.widths=75% 25%"/>
        <property name="item.label" type=string label=Item label value=Default label category=Caption localizable="true" key="#.title"/>
        <content>
        <field name="itemTitle" styles="style.radiobutton.group.title" type="Text-Rich">
        <setproperty name="layout.data" value="endline,span=2"/>
        <setproperty name="label" value=$../{item.label}"/>
        <setproperty name="margin" value="1mm,0mm,3mm,0mm"/>
        </field>
      CommentAdd your comment...