Fórum
tags cloud and blogs
venka reddy, modificado 12 Anos atrás.
tags cloud and blogs
Regular Member Postagens: 231 Data de Entrada: 23/03/11 Postagens Recentes
How Can we implement Communication between TagCloud and Blogs??
Sandeep Nair, modificado 12 Anos atrás.
RE: tags cloud and blogs
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Hi,
Its already working.
I place tags cloud portlet and blogs portlet in one page. I clicked the tag and all the blog posts for that tag are displayed.
Regards,
Sandeep
Its already working.
I place tags cloud portlet and blogs portlet in one page. I clicked the tag and all the blog posts for that tag are displayed.
Regards,
Sandeep
venka reddy, modificado 12 Anos atrás.
RE: tags cloud and blogs
Regular Member Postagens: 231 Data de Entrada: 23/03/11 Postagens Recentes
Hi Sandeep,
Thanks for your replay.
Ofcourse you said right, its working.
But i have to know how he is implemented???
Thanks for your replay.
Ofcourse you said right, its working.
But i have to know how he is implemented???
Sandeep Nair, modificado 12 Anos atrás.
RE: tags cloud and blogs
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
They are doing it by IPC. First they define the public render parameter in portlet-custom.xml
Then they tell which portlets support that public render parmeter. In our case Tag clouds and blogs. Check the same in portlet-custom.xml
Then whenever someone clicks on tag from tag cloud they make sure that they set tag parameter. See page.jsp of asset_tags_navigation
Finally when someone clicks the tag as you know, render for all portlets gets called, so if blogs portlet is in the page then it will get rendered again. While rendering it will see if url consists parameter tag, if yes then it will query db to get all the content based on the particular tag and show the result. See view.jsp of blogs portlet
Regards,
Sandeep
<public-render-parameter>
<identifier>tag</identifier>
<qname xmlns:x="http://www.liferay.com/public-render-parameters">x:tag</qname>
</public-render-parameter>
Then they tell which portlets support that public render parmeter. In our case Tag clouds and blogs. Check the same in portlet-custom.xml
<portlet>
<portlet-name>33</portlet-name>
<display-name>Blogs</display-name>
....
<supported-public-render-parameter>tag</supported-public-render-parameter>
</portlet>
<portlet>
<portlet-name>148</portlet-name>
<display-name>Asset Tags Cloud</display-name>
...
<supported-public-render-parameter>tag</supported-public-render-parameter>
</portlet>
Then whenever someone clicks on tag from tag cloud they make sure that they set tag parameter. See page.jsp of asset_tags_navigation
portletURL.setParameter("tag", tag.getName());
Finally when someone clicks the tag as you know, render for all portlets gets called, so if blogs portlet is in the page then it will get rendered again. While rendering it will see if url consists parameter tag, if yes then it will query db to get all the content based on the particular tag and show the result. See view.jsp of blogs portlet
String tagName = ParamUtil.getString(request, "tag");
if ((categoryId != 0) || Validator.isNotNull(tagName)) {
AssetEntryQuery assetEntryQuery = new AssetEntryQuery(BlogsEntry.class.getName(), searchContainer);
assetEntryQuery.setExcludeZeroViewCount(false);
if (BlogsPermission.contains(permissionChecker, scopeGroupId, ActionKeys.ADD_ENTRY)) {
assetEntryQuery.setVisible(Boolean.TRUE);
}
total = AssetEntryServiceUtil.getEntriesCount(assetEntryQuery);
results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
}
Regards,
Sandeep
venka reddy, modificado 12 Anos atrás.
RE: tags cloud and blogs
Regular Member Postagens: 231 Data de Entrada: 23/03/11 Postagens Recentes
Thanks Sandeep
I will go through it.
Once again thanks for your help
I will go through it.
Once again thanks for your help
venka reddy, modificado 12 Anos atrás.
RE: tags cloud and blogs
Regular Member Postagens: 231 Data de Entrada: 23/03/11 Postagens Recentes
Hi Sandeep,
i have Gone through it.
Same Concept i have used in my portlet it's not working .
i have Gone through it.
Same Concept i have used in my portlet it's not working .
Sandeep Nair, modificado 12 Anos atrás.
RE: tags cloud and blogs
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Its perfectly working fine. I just created a simple portlet in 10 mins to test the same. Please find the attached portlet and deploy it using plugins sdk.
It has setter portlet and getter portlet. Setter portlet accepts a parameter which on submitting is shown in Getter portlet using the same concept.
Regards,
Sandeep
It has setter portlet and getter portlet. Setter portlet accepts a parameter which on submitting is shown in Getter portlet using the same concept.
Regards,
Sandeep
Anexos:
venka reddy, modificado 12 Anos atrás.
RE: tags cloud and blogs
Regular Member Postagens: 231 Data de Entrada: 23/03/11 Postagens Recentes
Thanks Sandeep,
i will download and deploy it
Once Thanks for your help
i will download and deploy it
Once Thanks for your help
Sandeep Nair, modificado 12 Anos atrás.
RE: tags cloud and blogs
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
You wanted communication between two separate portlets like Tag Clouds and blogs
Sandeep Nair, modificado 12 Anos atrás.
RE: tags cloud and blogs
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Hmm, then please start with portlet developement guide
http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/portlet-development
Regards,
Sandeep
http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/portlet-development
Regards,
Sandeep