common component across all CQ5 pages - aem

I have created menu component, through which authors enter name, url field values.The component script renders the menu based on name, url entries.
Question : how to make this menu component common across all CQ5 pages, so it is not drag and dropped on each page.
Thank you,
Sri

ACS AEM Commons now supports this functionality without use of an iparsys - Shared Component Properties (http://adobe-consulting-services.github.io/acs-aem-commons/features/shared-component-properties.html)
Configure your menu with Shared and/or Global properties and you can simply template it directly onto all of your pages (no iparsys required). You can then edit the menu from any page on the site and it will by updated on all pages.

Related

Load a different form on different pages using the same page template

Kentico 12, not MVC:
I have a page template that is used on several pages. On some of those pages I want to display a form. (a biz form from the Forms application) I don't necessarily want the same form on each of those pages. I need a way to specify which form to display. I expect I could create a field in the page type to specify the form name, but it would be nicer to be able to have designers add a page with the form on it, and have a repeater display that page in a webpartzone on the aforementioned page template. I'm not sure how to do this, though. Anyone have an example or suggestions?
If you’re using portal engine, then you should easily be able to add an editor zone to your template. Content editors can then add the online form widget to individual pages. The widgets work at page level rather than template level, so should give the control you
The page from the docs will show how to setup an editor zone:
https://docs.kentico.com/k12/developing-websites/preparing-widgets-for-users/setting-up-widget-zones-on-pages
In addition to adding a widget zone, you can simply add an editable text webpart to the template and in the WYSIWYG editor you can click on the BizForm icon to insert that widget there. This doesn't require you to change the page template to a widget zone template.

What is a component, template and page in AEM/CQ

Please give me an overview of what a component, page, page component and template is in AEM. How are they related to each other. Please give example if possible.
Suggest any site to start as a beginner.
Your are mixing up technical and non-technical terms a bit. So I try to explain it in two ways: From an abstract, non-technical level, and from a technical point of view.
Abstract, non-technical explanation
The content of your AEM project mostly contains pages. A page is tied to an URL like www.example.com/products/teddybear. When a user opens this page he sees the content of the page. An image of the teddy bear, some descriptive text but also the header and footer of your page. This is where components come in. Content like the image, the text, the header and footer are all different components on that page.
Pages are composed of components.
Technical explanation
When developers try to implement pages and components they will need to create page templates, page components and components.
Page templates are basically XML files that define a few things about the page. For example the title of the page (e.g. "Content Page", "News Page", etc.) that is shown in the page creation dialog, a description, allowed parent pages (templates), allowed child pages (templates) and paths in your content where this page template can be used. Besides those things you can also define the basic structure of the page. Add a parsys, already add components to this parsys so those components are "hard wired" into every page you create.
Page components are the "implementation" of page templates. Here you can add the HTML for that page.
Components are the building blocks of pages. A component usually contains a JSP or HTML file that contains the HTML markup and maybe some business logic for that component.
Obviously, there are a lot more things to consider. But this should give you a basic overview over the relationship between all of those things.
Links:
Page Template documentation AEM 6.2
Component documentation AEM 6.2

How to tag pages and layout (not assets) in Liferay

I have a Liferay site. I have several pages that needs to be tagged so I can get them in a custom portlet.
I also need to present a page with an alphabetic index of the tagged pages.
I have read documentation and I have seen that Liferay can put a tag or a category only on "assets" (web content, etc.) and not on a page/layout.
Can you suggest me a way to do it?
You are right about tag/category, these can't be applyed to layout (unfortunately).
The best alternative is to use custom attribute and define the extra fields for the page.
See this image
You can read the custom attribute for the page using ExpandoBridge API.
Here an example to read an extra attribute within the theme velocity template.
#set ($customField= $layout.getExpandoBridge().getAttribute("CustomFieldKey"))
Note: Remember to set the permissions on each custom attribute. It's very important!

CQ5 sidekick elements disabled

I have an issue where at a specific path the sidekick items are disabled and I can't edit components on those pages. I'm logged in as admin and from the siteadmin I can't delete or move pages. If I go a node level lower or switch websites I have all of these permissions.
All if the items in the sidekick are visible but are greyed out. I can't see page properties when I'm on the siteadmin page either.
After reviewing the javascript console I see this happening:
charset=utf-8&cq_ck=1389020093589">http://testsetver.com:4502/home/users/a/admin.permissions.json?path=%2Fcontent%2Fwebsite&charset=utf-8&cq_ck=1389020093589 404 (Not Found) widgets.min.js:19516
I've seen similar behaviour when we had content moved via a package and it ended up creating a page without an associated jcr:content node. This doesn't have to be on the page that you are having problems with, it could be a sibling page. I would check the integrity of the pages under that website.

How to hide "User Information" options from "My Account" in Liferay 6.1?

I am trying to hide some options in "User Information" from My Account by using hook. I just want to hide it using CSS (style="display:none"). User Information is present in the right side of My Account Page.
I want to know, in which page I should make changes? While creating hook which page I should select for hiding those links like "Organizations, Sites, etc." Please help...
You have to choose the tab you want by writing them in the portal-ext.properties as follow :
#
# Input a list of sections that will be included as part of the user form
# when updating a user in the My Account portlet.
users.form.my.account.main=details,password,organizations,sites,user-groups,roles,personal-site,categorization
users.form.my.account.identification=addresses,phone-numbers,additional-email-addresses,websites,instant-messenger,social-network,sms,open-id
users.form.my.account.miscellaneous=announcements,display-settings,comments,custom-fields
Each field will be linked to its jsp. For exemple, "details" will display details.jsp.
Since your problem is finding the jsp file, you should do these :
download the Liferay source, and add the portal-trunk as a Liferay Project in Eclipse
Navigate through the portal to your desired file (manage my account), and get the url from your browser
Search for the "struts_action" attribute in the usl. For this case, it's "/my_sites/view"
This is very helpful as the first parameter indicates the portlet that controls the jsp page.
The second parameter usually is the jsp you are searching for
Find that file in the portal trunk and search for the html component you want to edit. it might be in the page itself, or it could be on an included one, or a sibling one (provided as a tab)
For your case, it's "/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp"
It is not possible to remove those options using CSS. We can do the following simple java code for removing those tabs... The page which we need to edit is "/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp".
List<String> identificationList = new ArrayList<String>();
for(String identificationItem : identificationSections){
identificationList.add(identificationItem);
System.out.println(identificationItem);
}
identificationList.remove("websites");
identificationList.remove("instant-messenger");
identificationList.remove("social-network");
identificationList.remove("sms");
identificationList.remove("open-id");
identificationSections = new String[identificationList.size()];
for(int i = 0; i < identificationList.size(); i++){
identificationSections[i] =identificationList.get(i);
}
Its easy to hide those links by using the simple java code written above.