Mike Robinson
Mike Robinson

Reputation: 25159

In CQ5, how do I configure an extJS component?

This question is specific to Adobe CQ5, so ExtJS answers by themselves won't be that helpful.

I have a custom text component with a menu option to change the background color. We're referencing a colorfield component in our dialog.xml, and so far everything works. The color menu appears with the default set of colors in the palette and can be clicked. So far so good.

I would now like to customize the palette and only show a select set of colors specific to our client. How do I achieve this?

Here's the relevant dialog.xml snippet so far:

<bgcolor
jcr:primaryType="cq:Widget"
fieldLabel="Background color"
name="./bgColor"
showHexValue="true"
xtype="colorfield"/>

Upvotes: 2

Views: 5533

Answers (2)

Steele
Steele

Reputation: 56

For future reference, you could probably get by creating a custom ColorField to call a custom ColorMenu which sets a custom ColorPalette. If ColorField had configurable options, these would probably be mentioned in the Ext docs or found in the JS file itself in /libs/cq/ui/widgets/..

Upvotes: 2

Mike Robinson
Mike Robinson

Reputation: 25159

Found it on dev.day.com - http://dev.day.com/content/kb/home/cq5/Development/HowToCreateCustomClientLib.html

Simply put, override the ExtJS widget with your own. Not ideal but it'll do.

Upvotes: 1

Related Questions