31 August, 2012

Solr Integration

If you want to configure solr with liferay, just follow below steps :

I used solr-3.5 and it is indexing and searching as expected.

  1. Download and extract vanilla Liferay + Tomcat bundle to development directory such as C:\liferay-portal-6.1.0-ce-ga1

17 August, 2012

Detect word and convert in URL

Guys,

I know this is not related to Liferay but might be useful in somewhere,
where you need to detect some words and convert it into URL then it would be helpful.

14 August, 2012

Terms of use page in Liferay 6.1

Hi Everyone,

If you want to use web content as a terms of use page we have 2 scenario.

First Scenario :

You can simply set below propeties in portal-ext.properties file  :

    terms.of.use.journal.article.group.id=
    terms.of.use.journal.article.id=

10 August, 2012

Create tab using AUI in liferay 6.1

If you have requirement to create simple tabs in liferay 6.1
AUI().ready('aui-tabs', function(A) {
 var tabs = new A.TabView(
  {
   boundingBox: '#demo',
   items: [
    {
     content: 'This my content 1',
     label: 'Tab 1'
    },
    {
     content: 'This my content 2',
     label: 'Tab 2'
    },
    {
     content: 'This my content 3',
     label: 'Tab 3'
    }
   ]
  }
 )
 .render();
});

09 August, 2012

Velocity variables for layout template

$processor      com.liferay.portlet.layoutconfiguration.util.velocity.TemplateProcessor
$request      javax.servlet.http.HttpServletRequest    
$themeDisplay      com.liferay.portal.theme.ThemeDisplay    
$company      com.liferay.portal.model.Company    
$user          com.liferay.portal.model.User    
$realUser      com.liferay.portal.model.User    
$layout      com.liferay.portal.model.Layout
$layouts      java.util.List<com.liferay.portal.model.Layout>
$plid          java.lang.Long
$layoutTypePortlet      com.liferay.portal.model.LayoutTypePortlet
$portletGroupId      java.lang.Long
$locale      java.util.Locale
$timeZone      java.util.TimeZone
$theme          com.liferay.taglib.util.VelocityTaglib
$colorScheme      com.liferay.portal.model.ColorScheme
$portletDisplay  com.liferay.portal.theme.PortletDisplay

07 August, 2012

Image upload restrict from ckeditor

Stay tune here for more information !!!
I am preparing article for that.
Guys I can not share code here because some policy, But you can handle and restrict other community folders from ck editor by making changes in BaseCommandReceiver.java class

06 August, 2012

portlet.xml tag sequence

Hi Everyone,

This is very rarely used but its important to know the sequence of tags given in portlet.xml file:

Here is the tags sequence of portlet.xml file  :

             description
             portlet-name
             display-name
             portlet-class
             init-param
             expiration-cache
             cache-scope
             supports
             supported-locale
             resource-bundle
             portlet-info
             portlet-preferences
             security-role-ref
             supported-processing-event
             supported-publishing-event
             supported-public-render-parameter
             container-runtime-option

03 August, 2012

Change date format in calendar header

If you want to change date format in calendar or any liferay portlet you can simply use FastDateFormatFactoryUtil API which is very useful to change in fornat.

Please see below sample example to change calendar header.

you can override below jsp using hook.

In init.jsp :

Format df = FastDateFormatFactoryUtil.getSimpleDateFormat("dd-MMM-yyyy");


in summary.jspf :

<liferay-ui:calendar
month="<%= selMonth %>"
day="<%= selDay %>"
year="<%= selYear %>"
headerFormat="<%= df %>"
data="<%= data %>"
/>

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...