If we set any value in session it will be available until session available.
Include Following Line in liferay-portlet.xml:
<private-session-attributes>false</private-session-attributes>
Create session attribute in any file:
PortletSession ps = req.getPortletSession();
ps.setAttribute(key, value, PortletSession.APPLICATION_SCOPE);
Example:
ps.setAttribute("SAMPLE_ATTRIBUTE", "sample", PortletSession.APPLICATION_SCOPE);
Access in other Portlet File:
String name = ps.getAttribute("SAMPLE_ATTRIBUTE", PortletSession.APPLICATION_SCOPE);
Now name contains sample.
Thursday, March 11, 2010
Programmatically import LAR file into Liferay.
public static void addDefaultLayoutsByLAR(
long userId, long groupId, boolean privateLayout, File larFile)
throws PortalException, SystemException {
Map parameterMap = new HashMap();
parameterMap.put(
PortletDataHandlerKeys.PERMISSIONS,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_SETUP,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.USER_PERMISSIONS,
new String[] {Boolean.FALSE.toString()});
LayoutLocalServiceUtil.importLayouts(
userId, groupId, privateLayout, parameterMap, larFile);
}
long userId, long groupId, boolean privateLayout, File larFile)
throws PortalException, SystemException {
Map
parameterMap.put(
PortletDataHandlerKeys.PERMISSIONS,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_DATA_CONTROL_DEFAULT,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.PORTLET_SETUP,
new String[] {Boolean.TRUE.toString()});
parameterMap.put(
PortletDataHandlerKeys.USER_PERMISSIONS,
new String[] {Boolean.FALSE.toString()});
LayoutLocalServiceUtil.importLayouts(
userId, groupId, privateLayout, parameterMap, larFile);
}
Installing Liferay 5.2.3 on Existing Apache Tomcat 6.0.24
1. Download and install Apache Tomcat 6.0.24 into your preferred directory.
2. Download and install JDK 5 . Set an environment variable called %JAVA_HOME% (in Windows) or $JAVA_HOME (in Linux/UNIX) to point to your JDK directory.
3. Create and edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml to set up the portal web application.
<Context path="" debug="0" reloadable="true" cookies="true" crossContext="false" privileged="false" />
4. Download liferay-portal-5.2.3.war.
5. Download Liferay's Portal 5.2.3 Dependencies.
5.1. Create a $TOMCAT_HOME/lib/ext directory and unzip the dependencies ZIP in there.
6. Edit $TOMCAT_HOME/conf/catalina.properties. common.loader= ${catalina.home}/common/classes,\ ...\ ${catalina.home}/common/lib/ext/*.jar
7. Make sure your database server is installed and is working.
If it's installed in a different machine make sure that it's accessible from the one where Liferay is being installed.
8. Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Tomcat.
8.1. Obtain the JDBC driver for your version of the database server. In the case of MySQL use mysql-connector-java-{$version}-bin.jar.
8.2. Copy the JAR file to $TOMCAT_HOME/lib/ext
9. Create a database for Liferay.
For example: create database lportal character set utf8; Liferay will automatically create the tables and populate it the first time it starts.
10. To add support for accessing Liferay's services remotely and to access the document library using WebDAV follow these steps:
10.1. Download tunnel-web.war
10.2. Create a directory called $TOMCAT_HOME/webapps/tunnel and unzip the WAR contents inside
11. Create $TOMCAT_HOME/conf/jaas.config.
PortalRealm { com.liferay.portal.kernel.security.jaas.PortalLoginModule required; };
12. Edit $TOMCAT_HOME/bin/catalina.bat so that Tomcat can reference the login module.
set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
13. Delete contents $TOMCAT_HOME/webapps/ROOT directory.
14. Unpack liferay-portal-5.2.3.war to $TOMCAT_HOME/webapps/ROOT.
15. For supporting UTF-8 UIRIEncoding, edit $TOMCAT_HOME/conf/server.xml.
16. Run Tomcat, point browser to http://localhost:8080. Sign in as test@liferay.com and password test
NOTE: ---- ************copy the following jar files in lib/ext folder to avoid startup problem:********
activation.jar annotations.jar ccpp.jar container.jar hsql.jar jms.jar jta.jar jutf7.jar mail.jar mysql.jar portal-kernel.jar
portal-service.jar portlet-container.jar portlet.jar postgresql.jar serializer.jar support-tomcat.jar xalan.jar xercesImpl.jar
xml-apis.jar
2. Download and install JDK 5 . Set an environment variable called %JAVA_HOME% (in Windows) or $JAVA_HOME (in Linux/UNIX) to point to your JDK directory.
3. Create and edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml to set up the portal web application.
<Context path="" debug="0" reloadable="true" cookies="true" crossContext="false" privileged="false" />
4. Download liferay-portal-5.2.3.war.
5. Download Liferay's Portal 5.2.3 Dependencies.
5.1. Create a $TOMCAT_HOME/lib/ext directory and unzip the dependencies ZIP in there.
6. Edit $TOMCAT_HOME/conf/catalina.properties. common.loader= ${catalina.home}/common/classes,\ ...\ ${catalina.home}/common/lib/ext/*.jar
7. Make sure your database server is installed and is working.
If it's installed in a different machine make sure that it's accessible from the one where Liferay is being installed.
8. Configure data sources for your database. Make sure the JDBC driver for your database is accessible by Tomcat.
8.1. Obtain the JDBC driver for your version of the database server. In the case of MySQL use mysql-connector-java-{$version}-bin.jar.
8.2. Copy the JAR file to $TOMCAT_HOME/lib/ext
9. Create a database for Liferay.
For example: create database lportal character set utf8; Liferay will automatically create the tables and populate it the first time it starts.
10. To add support for accessing Liferay's services remotely and to access the document library using WebDAV follow these steps:
10.1. Download tunnel-web.war
10.2. Create a directory called $TOMCAT_HOME/webapps/tunnel and unzip the WAR contents inside
11. Create $TOMCAT_HOME/conf/jaas.config.
PortalRealm { com.liferay.portal.kernel.security.jaas.PortalLoginModule required; };
12. Edit $TOMCAT_HOME/bin/catalina.bat so that Tomcat can reference the login module.
set JAVA_OPTS=-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config
13. Delete contents $TOMCAT_HOME/webapps/ROOT directory.
14. Unpack liferay-portal-5.2.3.war to $TOMCAT_HOME/webapps/ROOT.
15. For supporting UTF-8 UIRIEncoding, edit $TOMCAT_HOME/conf/server.xml.
16. Run Tomcat, point browser to http://localhost:8080. Sign in as test@liferay.com and password test
NOTE: ---- ************copy the following jar files in lib/ext folder to avoid startup problem:********
activation.jar annotations.jar ccpp.jar container.jar hsql.jar jms.jar jta.jar jutf7.jar mail.jar mysql.jar portal-kernel.jar
portal-service.jar portlet-container.jar portlet.jar postgresql.jar serializer.jar support-tomcat.jar xalan.jar xercesImpl.jar
xml-apis.jar
Wednesday, November 18, 2009
Import the lar file for the guest community.
Enable the below property in portal-ext.properties to import the lar file for the guest community.
#
# Specify a LAR file that can be used to create the guest public layouts.
# If this property is set, the previous layout properties will be ignored.
#
default.guest.public.layouts.lar=${liferay.home}/deploy/default_guest_public.lar
#
# Specify a LAR file that can be used to create the guest public layouts.
# If this property is set, the previous layout properties will be ignored.
#
default.guest.public.layouts.lar=${liferay.home}/deploy/default_guest_public.lar
SignOut Message in .vm File
Step: 1
Add the below lines in LogoutAction.java
after session.invalidate();
HttpSession logoutSession = request.getSession();
logoutSession.setAttribute("logoutSession", logoutSession);
Step: 2
create EXTServicePreAction.java under (com.liferay.portal.events.EXTServicePreAction.java )
EXTServicePreAction.java
package com.liferay.portal.events;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.liferay.portal.kernel.events.Action;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.util.WebKeys;
public class EXTServicePreAction extends Action {
public void run(HttpServletRequest req, HttpServletResponse res)
throws ActionException {
Map vmVariables = new HashMap();
HttpSession session = req.getSession();
HttpSession logoutSession = null;
logoutSession = (HttpSession)session.getAttribute("logoutSession");
try {
if(Validator.isNotNull(logoutSession)){
logoutSession.setAttribute("flag", true);
}else{
logoutSession = req.getSession();
logoutSession.setAttribute("flag", false);
}
} catch (Exception ex) {
Logger.getLogger(EXTServicePreAction.class.getName()).log(Level.SEVERE, null, ex);
}
vmVariables.put("logoutSession", logoutSession);
req.setAttribute(WebKeys.VM_VARIABLES, vmVariables);
}
}
step: 3
Add the below line in portal-ext.properties
servlet.service.events.pre=com.liferay.portal.events.ServicePreAction,com.liferay.portal.events.EXTServicePreAction
step: 4
Add the below line in portal_normal.vm
#if ($logoutSession.getAttribute("flag"))
<div>
<b>Successfully Logout</b>
$logoutSession.invalidate()
</div>
#end
Add the below lines in LogoutAction.java
after session.invalidate();
HttpSession logoutSession = request.getSession();
logoutSession.setAttribute("logoutSession", logoutSession);
Step: 2
create EXTServicePreAction.java under (com.liferay.portal.events.EXTServicePreAction.java )
EXTServicePreAction.java
package com.liferay.portal.events;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.liferay.portal.kernel.events.Action;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.util.WebKeys;
public class EXTServicePreAction extends Action {
public void run(HttpServletRequest req, HttpServletResponse res)
throws ActionException {
Map
HttpSession session = req.getSession();
HttpSession logoutSession = null;
logoutSession = (HttpSession)session.getAttribute("logoutSession");
try {
if(Validator.isNotNull(logoutSession)){
logoutSession.setAttribute("flag", true);
}else{
logoutSession = req.getSession();
logoutSession.setAttribute("flag", false);
}
} catch (Exception ex) {
Logger.getLogger(EXTServicePreAction.class.getName()).log(Level.SEVERE, null, ex);
}
vmVariables.put("logoutSession", logoutSession);
req.setAttribute(WebKeys.VM_VARIABLES, vmVariables);
}
}
step: 3
Add the below line in portal-ext.properties
servlet.service.events.pre=com.liferay.portal.events.ServicePreAction,com.liferay.portal.events.EXTServicePreAction
step: 4
Add the below line in portal_normal.vm
#if ($logoutSession.getAttribute("flag"))
<div>
<b>Successfully Logout</b>
$logoutSession.invalidate()
</div>
#end
Wednesday, July 29, 2009
Liferay testing tools
1. jUnit
2. selenium
3. jMeter
4. Grinder
2. selenium
3. jMeter
4. Grinder
Monday, July 27, 2009
liferay performance-tuning
----------------------------------------------------------------
Performance Improvement
----------------------------------------------------------------
a) Memory - garbage collection thru Admin interface
b) Parameters to JVM while starting tomcat
-Xms128m -Xmx1024m -XX:MaxPermSize=128m
c) DBCP instances - increase it in ROOT.xml
d) Properties file changes
last.modified.check=false
theme.css.fast.load=true
javascript.fast.load=true
e) Servlet Filters
Total of 15 filters. Disable the ones that are not required. eg.
CompressionFilter
StripFilter
Open web.xml and comment the entries for these filters.
Similarly for,
CASFilter
NtlmFilter
VirtualHostFilter
The fewer servlet filters you are running, the less processing power is needed.
f) Portlet
Edit the following files to disable certain portlets from getting deployed to the portal server.
portlet.xml
liferay-portlet.xml
Restart the server
g) Database design
Ensure all the search colums are indiced properly.
Do periodic house-keeping on the database indices.
Proper design of the database tables keeping in mind the normalization techniques.
h) Get the cache-ing enabled for database objects.
By default only the User_ table is cached. Cache other tables as well that will be frequenly accessed.
Refer to the place where you can do this setting.
i) Application Layer
Write your code in such a way that you make lesser database / hibernate calls.
Remember, every call to the persistence layer is going to take time. So be very careful using them. Never use persistence layer calls inside loops.
Write optimized queries when you put them in custom-sql files.
j) UI design
place fewer portlets on a portal page.
when you use images / flash objects make sure that they are very small.
If you write custom css / javascript compress them using YUI compressor so that they get downloaded to the browser pretty fast.
Replace Tinymce in the place of FCKEditor.
k) Setting logging mode to ERROR.
Performance Improvement
----------------------------------------------------------------
a) Memory - garbage collection thru Admin interface
b) Parameters to JVM while starting tomcat
-Xms128m -Xmx1024m -XX:MaxPermSize=128m
c) DBCP instances - increase it in ROOT.xml
d) Properties file changes
last.modified.check=false
theme.css.fast.load=true
javascript.fast.load=true
e) Servlet Filters
Total of 15 filters. Disable the ones that are not required. eg.
CompressionFilter
StripFilter
Open web.xml and comment the entries for these filters.
Similarly for,
CASFilter
NtlmFilter
VirtualHostFilter
The fewer servlet filters you are running, the less processing power is needed.
f) Portlet
Edit the following files to disable certain portlets from getting deployed to the portal server.
portlet.xml
liferay-portlet.xml
Restart the server
g) Database design
Ensure all the search colums are indiced properly.
Do periodic house-keeping on the database indices.
Proper design of the database tables keeping in mind the normalization techniques.
h) Get the cache-ing enabled for database objects.
By default only the User_ table is cached. Cache other tables as well that will be frequenly accessed.
Refer to the place where you can do this setting.
i) Application Layer
Write your code in such a way that you make lesser database / hibernate calls.
Remember, every call to the persistence layer is going to take time. So be very careful using them. Never use persistence layer calls inside loops.
Write optimized queries when you put them in custom-sql files.
j) UI design
place fewer portlets on a portal page.
when you use images / flash objects make sure that they are very small.
If you write custom css / javascript compress them using YUI compressor so that they get downloaded to the browser pretty fast.
Replace Tinymce in the place of FCKEditor.
k) Setting logging mode to ERROR.
Labels:
performance-tuning
liferay-clustering
Running Liferay in a clustered environment consists of 6 steps.
1. Preparations and getting things ready.
2. Connecting to a remote MySQL database.
3. Running 2 or More "IDENTICAL" Liferay tomcat instances on 2 Or more physical machines.
4. Making one machine as "Apache Web Server"
5. Connecting apache with tomcat using apache module "mod_jk"
6. Configuring mod_jk for clustering for both load-balancing and fail-over.
7. Verifying whether clustering is working fine.
=================================================================================
1. Preparations and getting things ready.
Select 4 physical machines (servers) in your LAN network. Each should have an internal IP address.
Just ping between the 4 machines and confirm that the pinging is successful.
Make sure none of the machines have fire wall running.
1 machine we'll use as Database server (Either windows or Linux) on which MySQL is installed and running
2 machines will be made as clustered servers on which identical verions of liferay is up running.
1 machine will be the apache http server which will be exposed to the outside world. Let this be a windows machine.
In the later part of this exercise we'll see how to run apache on a Linux server.
Note down the IP address of IP addresses of all four machines.
Machine 1 (MySQL) - [IP Address 1]
Machine 2-a (Liferay 1) - [IP Address 2]
Machine 2-b (Liferay 2) - [IP Address 3]
Machine 3 (Apache server with mod_jk) [IP Address 4]
----------------------------------------------------------------------------------------------
2. Connecting to a remote MySQL database.
----------------------------------------------------------------------------------------------
On the machine where mysql is running, open mysql prompt by typing "mysql -u root -proot mysql" from the command window.
Run these following scripts. Before running dont forget to modify the [IP Address X].
create database lportal2 character set utf8;
-- Giving access to the first Liferay machine (2-a)
---------------------------------------------------
insert into db (
Host
,Db
,User
,Select_priv
,Insert_priv
,Update_priv
,Delete_priv
,Create_priv
,Drop_priv
,Grant_priv
,References_priv
,Index_priv
,Alter_priv
,Create_tmp_table_priv
,Lock_tables_priv
,Create_view_priv
,Show_view_priv
,Create_routine_priv
,Alter_routine_priv
,Execute_priv
)
values (
"[IP Address 2]"
,"lportal2"
,"root"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"N"
);
GRANT ALL ON lportal2.* TO root@'[IP Address 2]' IDENTIFIED BY 'root';
-- Giving access to the second Liferay machine (2-b)
-- --------------------------------------------------
insert into db (
Host
,Db
,User
,Select_priv
,Insert_priv
,Update_priv
,Delete_priv
,Create_priv
,Drop_priv
,Grant_priv
,References_priv
,Index_priv
,Alter_priv
,Create_tmp_table_priv
,Lock_tables_priv
,Create_view_priv
,Show_view_priv
,Create_routine_priv
,Alter_routine_priv
,Execute_priv
)
values (
"[IP Address 3]"
,"lportal2"
,"root"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"N"
);
GRANT ALL ON lportal2.* TO root@'[IP Address 3]' IDENTIFIED BY 'root';
Important:
Once you have run the above scripts, pls dont forget to restart your MySQL.
Verification:
Now open the command window in the 2 machines where liferay is running and enter the command,
mysql -h [IP Address 1] -u root -proot lportal2;
This should successully get entry to the mysql prompt.
Do the similar thing on the other machine where Liferay is running and confirm that is it also connecting to
the remote Mysql database server.
1. Preparations and getting things ready.
2. Connecting to a remote MySQL database.
3. Running 2 or More "IDENTICAL" Liferay tomcat instances on 2 Or more physical machines.
4. Making one machine as "Apache Web Server"
5. Connecting apache with tomcat using apache module "mod_jk"
6. Configuring mod_jk for clustering for both load-balancing and fail-over.
7. Verifying whether clustering is working fine.
=================================================================================
1. Preparations and getting things ready.
Select 4 physical machines (servers) in your LAN network. Each should have an internal IP address.
Just ping between the 4 machines and confirm that the pinging is successful.
Make sure none of the machines have fire wall running.
1 machine we'll use as Database server (Either windows or Linux) on which MySQL is installed and running
2 machines will be made as clustered servers on which identical verions of liferay is up running.
1 machine will be the apache http server which will be exposed to the outside world. Let this be a windows machine.
In the later part of this exercise we'll see how to run apache on a Linux server.
Note down the IP address of IP addresses of all four machines.
Machine 1 (MySQL) - [IP Address 1]
Machine 2-a (Liferay 1) - [IP Address 2]
Machine 2-b (Liferay 2) - [IP Address 3]
Machine 3 (Apache server with mod_jk) [IP Address 4]
----------------------------------------------------------------------------------------------
2. Connecting to a remote MySQL database.
----------------------------------------------------------------------------------------------
On the machine where mysql is running, open mysql prompt by typing "mysql -u root -proot mysql" from the command window.
Run these following scripts. Before running dont forget to modify the [IP Address X].
create database lportal2 character set utf8;
-- Giving access to the first Liferay machine (2-a)
---------------------------------------------------
insert into db (
Host
,Db
,User
,Select_priv
,Insert_priv
,Update_priv
,Delete_priv
,Create_priv
,Drop_priv
,Grant_priv
,References_priv
,Index_priv
,Alter_priv
,Create_tmp_table_priv
,Lock_tables_priv
,Create_view_priv
,Show_view_priv
,Create_routine_priv
,Alter_routine_priv
,Execute_priv
)
values (
"[IP Address 2]"
,"lportal2"
,"root"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"N"
);
GRANT ALL ON lportal2.* TO root@'[IP Address 2]' IDENTIFIED BY 'root';
-- Giving access to the second Liferay machine (2-b)
-- --------------------------------------------------
insert into db (
Host
,Db
,User
,Select_priv
,Insert_priv
,Update_priv
,Delete_priv
,Create_priv
,Drop_priv
,Grant_priv
,References_priv
,Index_priv
,Alter_priv
,Create_tmp_table_priv
,Lock_tables_priv
,Create_view_priv
,Show_view_priv
,Create_routine_priv
,Alter_routine_priv
,Execute_priv
)
values (
"[IP Address 3]"
,"lportal2"
,"root"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"Y"
,"N"
,"N"
);
GRANT ALL ON lportal2.* TO root@'[IP Address 3]' IDENTIFIED BY 'root';
Important:
Once you have run the above scripts, pls dont forget to restart your MySQL.
Verification:
Now open the command window in the 2 machines where liferay is running and enter the command,
mysql -h [IP Address 1] -u root -proot lportal2;
This should successully get entry to the mysql prompt.
Do the similar thing on the other machine where Liferay is running and confirm that is it also connecting to
the remote Mysql database server.
Labels:
clustering
,
liferay
Tags and Asset Publisher
1.Tags
=======
Go to the Admin page in the Guest Community.
Add the Tags Admin portlet to the page.
Under Add Tag, type dog and add a new category named Animals.
Add another tag named tom add a new category named Friends.
Add a third tag named jane to the Friends category.
First, we will tag a journal article with the dog tag.
Go to the CMS page and click Articles.
We will create an article containing a Haiku about dogs.
After clicking Add Article you are taken to the Edit page.
On the right of the Body Box there is a section labeled Categorization. In that box click Select
Tags.
Select the tag dog, and save. Once you have added your Haiku, click Save and Approve
As Administrator, create a page named Links and place the bookmarks portlet on it.
Click Add Folder and create a folder named Fun Links and open the folder to add a
Bookmark.
We will use the Wikipedia page for dogs as a link. Name the link Dog Wiki, and set the URL
as http://en.wikipedia.org/wiki/Dog.
Click Select Tags and choose
the tag dog.
Click Save when finished
=========================================================================================
2.Asset Publisher
==============
Create a new page under CMS named CMS Article 2.
Change the layout to 50/50 Two Column.
Add two Asset Publisher Portlets to the page, one to each side. Your page should look like
this:
By default the portlet displays all kinds of content. We will change that
Click the Configuration icon on the Asset
Publisher in the left column.
In the Query Logic tab, select tags by the
Animals category, then save.
Click the Display Settings tab, and set the
Display Style to Full Content. Click Save
and return to the full page.
The left Asset Publisher now looks like this:
Now click the Configuration icon on the right Asset Publisher portlet.
Under Query Logic set it so the displayed content must contain the tag jane.
In the Display Settings tab, once again set the Display Style to Full Content. Click Save, and
return to the full page.
Now you should have the haiku, picture, and bookmark on the left, and the picture on the
right.
Click the Configuration icon on the left Asset Publisher.
Under Query Logic set it so the displayed content must NOT include the tag tom, and click
Save.
=======
Go to the Admin page in the Guest Community.
Add the Tags Admin portlet to the page.
Under Add Tag, type dog and add a new category named Animals.
Add another tag named tom add a new category named Friends.
Add a third tag named jane to the Friends category.
First, we will tag a journal article with the dog tag.
Go to the CMS page and click Articles.
We will create an article containing a Haiku about dogs.
After clicking Add Article you are taken to the Edit page.
On the right of the Body Box there is a section labeled Categorization. In that box click Select
Tags.
Select the tag dog, and save. Once you have added your Haiku, click Save and Approve
As Administrator, create a page named Links and place the bookmarks portlet on it.
Click Add Folder and create a folder named Fun Links and open the folder to add a
Bookmark.
We will use the Wikipedia page for dogs as a link. Name the link Dog Wiki, and set the URL
as http://en.wikipedia.org/wiki/Dog.
Click Select Tags and choose
the tag dog.
Click Save when finished
=========================================================================================
2.Asset Publisher
==============
Create a new page under CMS named CMS Article 2.
Change the layout to 50/50 Two Column.
Add two Asset Publisher Portlets to the page, one to each side. Your page should look like
this:
By default the portlet displays all kinds of content. We will change that
Click the Configuration icon on the Asset
Publisher in the left column.
In the Query Logic tab, select tags by the
Animals category, then save.
Click the Display Settings tab, and set the
Display Style to Full Content. Click Save
and return to the full page.
The left Asset Publisher now looks like this:
Now click the Configuration icon on the right Asset Publisher portlet.
Under Query Logic set it so the displayed content must contain the tag jane.
In the Display Settings tab, once again set the Display Style to Full Content. Click Save, and
return to the full page.
Now you should have the haiku, picture, and bookmark on the left, and the picture on the
right.
Click the Configuration icon on the left Asset Publisher.
Under Query Logic set it so the displayed content must NOT include the tag tom, and click
Save.
CMS Utility portlet
CMS Utility portlet
=======================
Breadcrumb
Navigation Portlet
Sitemap
Journal content search
Web proxy
RSS portlet
weather
stocks
=======================
Breadcrumb
Navigation Portlet
Sitemap
Journal content search
Web proxy
RSS portlet
weather
stocks
Subscribe to:
Posts
(
Atom
)