How to add the custom components in AEM? - aem

How to do the custom components in AEM?
like i have tried to do it by changing the html code in clientlibb but do not understand how to do it properly

To create a custom component you need to create a component node under /apps/<your_proj>/component. Once created, under the node rename the .jsp file to .html and then add your dialog node.
This link should help.

Related

Customizing AEM dialog - increasing all field's sizes

I have a carousel component for which there is a touch UI dialog naming '''cq:dialog''' .I need to increase size of all the fields of AEM dialog. Can anybody help me with this?
You can extend the aem style sheets by creating a clientLib:
Create a folder on file system. In this folder put a file with name content.xml.
The content of this must be
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:ClientLibraryFolder"
categories="[coralui3]" />
The most important thing is categories=[...]. The name of categoriy must be "coralui3".
During deployment your own css styles will be virtuelly added to your enviroment.
Then put two files into the folder. One file must be named with css.txt. The name for your other one can be named by your own. In example 'myown.css'. Open css.txtand put the name of your css file into it. See also this video on youtube.
If you want to apply your style on all dialog widgets, you style classes must be named like the classes from AEM itself.
In case you want to apply partially, you have create your own css class. Then open your dialogs xmls and add the keyword "granitCss=" to you prefered widget. See also here.

How to add custom javascript in Laravel-Backpack

Is there any way to add custom javascript?
I want to add custom javascript to some of the pages but it seems i am not able to.
Each default Backpack operation has its own CSS and JS file, in:
public/vendor/backpack/crud/css
public/vendor/backpack/crud/js
If you don't find one there, you can create one, and Backpack will pick it up in that operation's view (e.g. create.css or list.js).
Read more: https://backpackforlaravel.com/docs/3.5/crud-how-to#customize-css-and-js-for-default-crud-operations

How can I tag a component in AEM 6.1?

I need to know if is possible tag a component button like a 'CTA' (call to action).
In the Adobe documentation i found how tag a page but not a component
Thank in advance
tagging is supposed to be associated with content e.g. pages, assets etc. Components are more of part of code and would not be tagged. you can create component groups as pointed out by d33t.
You mean probably to add a component to a group? There are no tags for components. You can group one or more components by adding the following property to the component's node:
componentGroup="Your group"

is it possible for a node to extend/inherit jcr content node (properties and child nodes)

I need to add a new menu item to siteadmin under create->menu of /libs/wcm/core/content/siteadmin. Now, one way to do that might be to make a complete copy under apps/<my-app>/wcm/core/content/siteadmin which works fine. But, I would like to NOT do a deep/complete copy of siteadmin instead have my app/<my-app>/wcm/core/content/customsiteadmin extend the lib's siteadmin and be able to add the additional node that i require.
Can somebody tell me what node type/properties that I require on my customsiteadmin node to achieve the same?
PS: I have tried using sling:resourceSuperType=/libs/wcm/core/content/siteadmin to the customsideadmin node which doesn't work. I guess the sling:resourceSuperType is only for overriding script resolution? but the node that I'm trying to override is a like a content node
You can overlay individual files in /apps to override functionality of the files in /libs. The Adobe documentation has an example for foundation components, but this works for other CQ/AEM functionality as well. Even though the documentation instructs you to copy the entire component, you just need to have the modified file(s) under /apps.

Custom Field in CQ5 Page console

When we create a new page in CQ5 'siteadmin' , we get two fields to fill up ("Name" and "Title").
Could there be any way to add more fields here (Say, "Description") which the authors can fill up and it will be saved as a JCR property of the page in CRX ?
Any ideas/solutions will be welcome. I can't think of any.
You want to add custom page properties. From the linked knowledge base article:
(1) Copy /libs/foundation/components/page/dialog node to your template's
component that you want to add dialog properties to.
(2) Add fields to the dialog
Example:
If you had a page component /apps/<myapp>/components/pages/contentpage
that has sling:resourceSuperType=/libs/foundation/components/page then
you would copy /libs/foundation/components/page/dialog to
/apps/<myapp>/components/pages/contentpage/ to make an overlaid dialog