How to add custom styling in pageproperties in AEM - aem

I have template and page properties. I had added custom tab to page properties, where I need to modify the height and width of page property tab. How can I add custom styling to page properties. I using AEM 6.5 version.

If you want to make the change globally, on all the dialogs, you can always write a .CSS file with the category cq.authoring.dialog.
If however, you want it to be specific to that dialog, you can add a JCR property in the page properties dialog node:
extraClientlibs -> {the value would be the name of categories for your JS/CSS files}
And it should pick up the styling/scripting from there.

Related

Hi, If we want to show/hide both tabs and fields in AEM, based on the style selected for a component

Like for my one component there a two styles added , if style one is selected then I have to hide 1 field in cq:dialog and if style 2 is selected then I have to show that field
Is the style mentioned above, is a dropdown within same dialog? If yes, there are numerous examples explaining how to implement Show/Hide of dialog fields. Please check here, here, here, here.
Basically idea is on the dropdown field, add a class cq-dialog-dropdown-showhide and a property cq-dialog-dropdown-showhide-target with a value of class selector unique to component. Then by defining property showhidetargetvalue on the element, selecting the dropdown will show/hide respective properties.
If the style you mentioned is the style system applied using brush icon, it is not OOTB. You ll need to add an authoring clientlib and implement logic to hide specific dialog field based of style system applied.
IMO style system is presentational, only to apply skin to the component. It should not drive business logic of allowing dialog properties. As simplistic, maybe allow authors to enter all allowable fields at dialog and using JS, you may consume / not, the dialog properties.

Apache Sling content include - CQ5

I have cq5 content page below content tree in crxde.
The content page has a header, a footer and one component in the body section.
I am trying to get the only content that authored in that specific component (No header, No footer, No Edit bar of component)
I tried following, but it produced the whole page with header, footer and component.
<sling:include path="/content/site-content/disclaimers/risk-considerations.html" />
then, I tried this, there is no header, footer but it still displays Component edit bar.
<sling:include path="/content/site-content/disclaimers/risk-considerations.content.html" />
How could I achieve only returning authored content into another page?
Based on what you need, reference component as Abhishek said fits your use-case. Given that you won't want to hardcode a path within a component or page you would use a dialog to get the path to HTML to include, reference component does that for you in addition to that your use-case of disabling edit-bar/behavior is taken care of within the component.
But in case you are constrained to use your existing approach, then to disable editbar you would need to update your component script to change the mode prior and post inclusion. You can refer to reference component for same. You can also refer to stackoverflow answers here and here

TYPO3 TCA - Display or hide tabs at treelevel

For an project, I have extended the TYPO3 TCA with a extra extension, named "project_extends". Now, I have all new TCA Objects - sorted in tabs - on every Treepoint/Contentpage, to configurate some fluid templates or extensions.
For example: I have three tabs, named "Tab1","Tab2" and "Tab3".
Now I want to display Tab1 and Tab3 at the second tree-level of the contentpages, but not at level one.
I don't found a understandable solution via google & co and hope here of helpful solutions :)
That's simple, to hide whole tab you just need to disable ALL fields which are visible on it.
To do this open page properties, find Page TSconfig field and for each field you want to disable add something like this:
TCEFORM.tt_content.list_type.disabled = 1
in this sample tt_content is a required table and list_type is the field. Normally (without above config) it should be visible as only field on the Plugin tab when inserting TT content with type Insert Plugin , however while you disabled it will be hidden and also tab will disappear.
Tip: you can recognize these values using some browser inspection tool, i.e. FireBug of Firefox.

Inheriting dialogs in Adobe CQ5

I'm trying to implement a component dialog by inheriting a dialog of a base component. I'm having troubles with dialogs when used twice.
BASE COMPONENT
dialog
text (name: "./text/content")
OTHER COMPONENT
dialog
text (inherited from base)
text (inherited from base)
settings
other
The problem with this is that it inherits the name as well and it doesn't look like you can override it. How can I make my jsp print out the two rich-text if they get inherited with the same name? Does CQ5 provide an index so that they can be referenced in the JSPs?
If your plan is to have two rich text areas in the dialog of components that inherit from the base, then you must include two rich text areas with unique names in the base component dialog.
Each input field of a dialog must have a unique name otherwise they will point to the same property path relative to the jcr:content node of the component when used on a page.
As mentioned above, Each input field of a dialog must have a unique name otherwise they will point to the same property path relative to the jcr:content node of the component when used on a page. Here, this will confuse the CRX while recognizing the textArea to be referred and the second one will not be referred.

Component without a dialog won't display in Sidekick

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.