I am new to hobo and am still trying to wrap my head around DRYML. I wanted to extend a show-page tag and modify the field-list. I did the following:
<extend tag="show-page" for="Acreage">
<old-show-page merge>
<field-list fields="code, note, legal_description, acres, latitude, longitude, address, city, state, zip_code" param/>
</old-show-page>
</extend>
This code did not override the field-list. The auto-generated fields in pages.dryml were displayed instead. Note that there is no ":" after field-list.
When I change the code to include a ":" after field-list, then it displays the new field list defined in the extension.
<extend tag="show-page" for="Acreage">
<old-show-page merge>
<field-list: fields="code, note, legal_description, acres, latitude, longitude, address, city, state, zip_code" param/>
</old-show-page>
</extend>
This led me to wonder if that behavior is the same for all "extend" definitions, so I tried it out on a form tag
<extend tag="form" for="Acreage">
<old-form merge>
<field-list fields="code, name, note, legal_description, acres, latitude, longitude, address, city, state, zip_code" param/>
</old-form>
</extend>
I left out the ":" after field-list, but the extended definition still displayed as intended. Hmmm, will adding a ":" break it?
<extend tag="form" for="Acreage">
<old-form merge>
<field-list: fields="code, name, note, legal_description, acres, latitude, longitude, address, city, state, zip_code" param/>
</old-form>
</extend>
Nope, the extended tag still displays as it should.
I find it interesting that a "form" tag extension works properly with or without the ":", but the "show-page" tag extension will not work (at least the field-list tag) unless the ":" is present.
Can anyone shed some light on this behavior? Is it intended or otherwise?
Thanks,
Tyler