? Error

User tests: Successful: Unsuccessful:

avatar phproberto
phproberto
10 Oct 2013

Issue tracker:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32229

This opens the way to follow to start using layouts to render fields. This would allow override fields in templates i.e.

You can customise the layouts specifically also for a field instance with the layout attribute. Example:

<field
    name="caching"
    type="list"
    default="2"
    label="COM_CONFIG_FIELD_CACHE_LABEL"
    description="COM_CONFIG_FIELD_CACHE_DESC"
    required="true"
    filter="integer"
    layout="field.mylayout"
    >
        <option value="0">COM_CONFIG_FIELD_VALUE_CACHE_OFF</option>
        <option value="1">COM_CONFIG_FIELD_VALUE_CACHE_CONSERVATIVE</option>
        <option value="2">COM_CONFIG_FIELD_VALUE_CACHE_PROGRESSIVE</option>
</field>

That will render a list field but instead of using the standard joomla.form.field.list it would use the layout field.mylayout. This is useful for example if we want to add some AJAX logic. Instead of creating our own field we just create a custom layout.

Also for the recent chosen issues this would allow us to add a class to every single select field (something not recommendable :D )

avatar phproberto phproberto - open - 10 Oct 2013
avatar wilsonge
wilsonge - comment - 11 Oct 2013

Travis says no :( it also seems to have code echo'd out into it. not sure what that's about

avatar wilsonge
wilsonge - comment - 8 Nov 2013

Can we rebase this on master please? then I'm gonna go test it

avatar brianteeman
brianteeman - comment - 23 Jul 2014

Closed as per comment on joomlacode. @phproberto do you want to update it?

avatar brianteeman brianteeman - close - 23 Jul 2014

Add a Comment

Login with GitHub to post a comment