Component without a dialog won't display in Sidekick - aem

If a component is created, but a dialog.xml file isn't included within it, it will not show as available within the Sidekick, even if enabled in Design mode, and with a Component Group specified — why is this?

If you add a cq:editConfig node to the component it will show up in the sidekick, after being enabled in the design dialog of the parsys, without having a dialog.
As reference: http://dev.day.com/docs/en/cq/5-3/developing/components.html#Components and their structure

dialog boxes are meant for dynamically adding content to the components.
if there is no dialog box in a component there is no reason for component to display in sidekick .
u can directly hard code the component like this.
<cq:include path="par0" resourceType="/apps/...." />

Have you gone into the design portion to allow your component? I've often created a new component, and been unable to add it simply because I forgot to allow it in the design mode on that page.
EDIT
Good point - I do believe a dialog.xml file is required for it to show up in the sidekick. Otherwise you have to hard code the include of your component where you need it. I would suggest adding a dialog.xml file, even if it is only for the reason of showing it in the sidekick, so you can add it dynamically to different pages.

Related

Using built in AEM form

The form component in AEM and all other form related components mandate that it should be used under parsys component (by dragging and dropping). When I use these form components without a parsys as their parent, are not behaving as expected for ex: form end component does not show submit button even though i have checked the option to show submit button.
Question: I want to use the form components but I don't want to use drag and drop. I want to create a reusable form component with predefined fields. Any way to achieve this?
Finally after a lot of searching, I found the best solution here :
http://versatileankur.blogspot.in/2014/11/component-with-default-components-in-cq5.html

AEM dynamic components parbase

I have components that are generated dynamically after they are added to the page. These components are generated on the fly and in some instances are floating elements. This makes it very dificult for parsys to draw correctly. All the time the parsys (parbase - css class name) has a height of 0. I can fix that by changing the default property of parbase from overflow="visible" to overflow="auto". However I want to know if anyone else has run into this issue and what is the best method to do this implementation when you are only on edit mode but ignore it on any other view.
So you have a few options.
First, you can check the WCMMode in the page header and if the mode is EDIT then you can load an "editmode.css" after your main CSS has loaded. This is where I put overrides to handle drawing issues like what you encountered.
This keeps it all in one place, and in any mode other than edit that css will never load.
The second option is to allow these items to flow normally in Edit mode and disable floats, as suggested above. Depending on how editing works, one or the other might be superior.

Component group not showing in sidekick (Adobe CQ)

Im using adobe CQ 5 and I have created a bunch of components.
For all these components I have set allowedParents to */parsys and I have defined the componentGroup as xyz.
My page contains the parsys component. When I enter the parsys design mode, the list of allowed components does not show the component group xyz.
Please help!
Thanks in advance
Kindly make sure that your components jcr:title is not the same as the component's name. For Eg: if the name of the component is text, then the title should at least be Text and not text. Change it and then check in the design mode, it will list your component group.
Please verify your Jcr:title (text) does not match with your component name. A difference needs to be mentioned i.e. if your component name is Title, then your jcr:title should have title. If the component is still not in sidekick after this, then add this too:
Add cq:editConfig to your component. This will enable you to add your component in sidekick. There is no need to create a dialog.
If your component does not have dialog then child node cq:editConfig enables the component to show in the sidekick. for more please visit http://www.cqtuts.com/cq5/cq5-component.html

AEM/CQ5 how to share component values?

I want to have a header component that is shared across multiple page rendering components. The header component has a text label. How do I make the value of this text label available to all page components.
Do I have to make the path in the <cq:include> to a common format?
Design mode, if properly understood, can work quite well. However, it doesn't replicate content in the same manner as page activation, and thus can be confusing for your authors. Also, the sharing model is limited to the exact page type - which may or may not be the granularity you desire.
From CQ5's Best Practices (https://dev.day.com/docs/en/cq/current/developing/developing_guidelines_bestpractices.html), they strongly encourage the paragraph system (iparsys to inherit/share). iparsys named the same can be shared across different page templates (while design mode will only apply to a single template type).
I can archive that by creating a design dialog that is similar to dialog (http://dev.day.com/docs/en/cq/5-6/developing/components.html#Dialogs) under the header component. You add the text label field to design dialog. And to enter value for the field, you switch the page to the design mode and click on Edit button on the top of the component. The entered value will be available to all pages that contain the header component.
Note: design dialog will be named as design_dialog
This functionality is now offered in ACS AEM Commons as Shared Component Properties - http://adobe-consulting-services.github.io/acs-aem-commons/features/shared-component-properties.html
Supports standard content activation and internationalization (values stored below the homepage) and anything else you would expect from content.
If the component is baked in the template(i,e page rendering component), yes you can make the <cq:include> path attribute to point to some common place where the data for this is stored and all the pages irrespective of , type of the template can get the values configured.
You can create header component and then include it using <cq:include> in base template/page. This base template/page will be inherited by all other templates. This way the header once configured in base page is availble through out different templates/page components.
If the goal is to share "across multiple page rendering components" the design dialog will only help if the page share the same rendering component.
If you want to have the header component displayed in a page and all its subpages, then you should use iparsys.
If you just want to reuse the properties of that header component, then it needs to have a fixed path (cq:include in a page component) and then you can reference the properties you need in other page rendering components. I would not suggest that approach since it breaks the idea of having a component. Everything becomes tightly coupled.
What you could also do is save those properties at the page level (some top parent page) and then use InheritanceValueMap in the subpages to read those properties.

Sitecore - how to persist a Layout change

I developed a Sitecore control I'd like to put into a layout on one page.
In this case it's a registration page, and my control is defined as a sublayout.
What I did is went into the Page Editor interface, and plonked the control into one of the placeholders.
What I want to do now is to create a package only containing the information that this control is on this particular page, without affecting e.g. the content or subitems of this node.
Can you please advise on the best way to create such packag, what exactly to select in the Package Designer?
Thanks
I don't believe the Package Designer gives you granular control to include just specific fields of an item. You need to add the item as whole.
You should configure layouts and renderings in the presentation details of an item OR even better in the __Standard Values of the template.
You can call the presentation details dialog through the content editor. Just select an item in the content tree, click on the Presentation tab in the top ribbon and select Details. You can configure all layouts/renderings for the selected item here.
But ff you want to prevent content changes you really SHOULD configure the presentation in the __Standard Values of the template. This is also the way, which is recommended by Sitecore. If you do this, the layouts are all you have to put into a package.