February 2012
1 post
4 tags
Liferay Sync
Liferay Sync allows you to access your files from your Liferay 6.1 document library from where ever you are. Desktop / Mobile Device.
View Product Information
Download Here
January 2012
6 posts
3 tags
Skin Selectable Theme →
A blog post on Liferay.com
2 tags
Liferay 6.1 CE GA is available now! →
2 tags
2 Column Layout
2 tags
2 tags
Ray By Day →
December 2011
8 posts
3 tags
Liferay 6.1 alternative delete page "x" styling
BEFORE:
AFTER:
2 tags
Cross Browser: inline-block →
1 tag
Liferay 6.1 Download Available →
2 tags
2 tags
Embedding Navigation Portlet into Layout file
3 tags
Velocity Permission Variables
Here are some velocity variables you can use to check permission in the theme such as “portal_normal.vm”
$theme_display.getPermissionChecker().isOmniadmin()
- Returns true if the user is a universal administrator.
$theme_display.getPermissionChecker().isCompanyAdmin()
- Returns true if the user is an administrator of their company.
...
4 tags
Portlet information in database helps with portlet...
“portletpreferences” table in database is a great place to look when trying to see what portlet id and preferences are needed for a portlet when embedding the portlet
4 tags
November 2011
9 posts
2 tags
1 tag
2 tags
2 tags
Create CSS only Circles →
4 tags
Demos for the nightly build of Alloy →
5 tags
Display Custom Field on Nav_item
$nav_item.getLayout().getExpandoBridge().getAttribute(“custom_field_attribute_name”)
2 tags
10 Useful CSS Properties Not Supported By Internet... →
3 tags
Create CSS Arrows →
Create arrows with only CSS
2 tags
October 2011
25 posts
4 tags
5 tags
New Gartner Magic Quadrant for Horizontal Portals →
See how well Liferay did on Gartner Magic Quadrant for Horizontal Portals
6 tags
Logout and stay within current community
This code logs you out and then reloads the current community instead of sending you to the guest community.
3 tags
Use Custom URL Variables to Display certain...
Ever wanted to explicitly define what page to display on the current pagination content from a url password?
This code should should aim you in the right direction.
Logic:
-Get url variable (“page”) value.
-set $total to the size of the pagination repeatable structure.
-If $pageId is set and is less than or equal to $total then use $pageId; else use the latest item.
Pagination...
7 tags
Customize Look and Feel Settings for Portlet...
setting look and feel settings on a non-instancable portlet embedded in the theme
5 tags
Add Localization in a Theme by Ray Augé
to add localizations in a theme, add this compile section your your build.xml and the languages in the usual location
- this can be useful if you add your own custom settings that the keys are not in the portal’s language.properties file.
7 tags
Velocity #foreach Variables
I came across some velocity variables (1.6.4) that could help you save a couple lines of code. $velocityCount: Current index of the foreach loop (starts at 1) $velocityHasNext: Checks if there is another item in the loop -Freemarker version
2 tags
5 tags
Mobile Web Testing
This week I have been exploring the world of mobile web. One issue I ran into was not being able to see what css classes exsist while viewing Liferay from an iPhone or Android phone. Here is a simple javascript link that can be added in your portal_normal.vm file.
While in a mobile browser you can click the link to see what css classes you can use to target your mobile experience
4 tags
How to Use an Application Adapter →
Sometimes when you create a hook you don’t want it to be applied to every part of your Liferay Server. Use Application Adapter to apply hook to particular Sites or Site Templates
6 tags
Liferay 6.1 Compass and Sass
to use these features in Liferay 6.1 just add
@import “compass”;
at the top of your custom.css file in your theme.
Resources: SaSS and Compass
here are some things I like about it:
COMPASS:
@include border-radius(4px);
OUTPUTTED CSS:
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
...
5 tags
Tips for Liferay Layouts
1. Use Table Based Layouts for Browsers IE 6 & 7 (#if ($browserSniffer.isIe($request) && $browserSniffer.getMajorVersion($request) )
2. Set “main-content” class to be the layout name. That way you can target via CSS when this layout is in use.
3. Remember Layouts can be embedded in a theme or deployed to the entire Liferay Server.
2 tags
6 tags
Debug with un-minified CSS or Javascript code in...
To View un-minified CSS add “css_fast_load=0” to your url
To View un-minified JS add “js_fast_load=0” to your url
http://localhost:8080/web/guest/?css_fast_load=0
5 tags
Compass and Sass Bundle for Textmate →
Install Instructions:
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone -b TextMate git://github.com/kuroir/SCSS.tmbundle.git “SCSS.tmbundle”
osascript -e ‘tell app “TextMate” to reload bundles’
3 tags
Run Liferay Bundle with MySQL Database
add this code to your portal-ext.properties file
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=
replace lportal with your database name
if portal-ext.properties doesn’t exsist then create it at:...
4 tags
Deploy Several Liferay dependencies at once
Go to your plugins folder in your terminal:
then paste and run the script.
For this example the code deploys the dependencies for “Seven Cogs”,
var=”portlets/google-maps-portlet,
webs/kaleo-web, portlets/mail-portlet,
themes/sevencogs-mobile-theme,
themes/sevencogs-theme,
portlets/social-networking-portlet,
portlets/web-form-portlet”; for v in ${var//,/ }; do cd...
6 tags
Modify Navigation portlet to style selected links
The Problem:
By Default the Navigation Portlet doesn’t traverse the selected class up to the root element; only to the current page that is selected. If the Nav tree is deep of levels, if set to add the selected class by default it could cause some loading time issues
Notice in this picture Page1 isn’t bold, because the selected class isn’t added to it.
This is the html...
5 tags
Liferay in Action Book by Rich Sezov
Amazon.com Widgets
4 tags
Chrome Console Fix
If you are on a version of Liferay prior to 6.1.0 and Javascript log messages are not displaying in the Console Log of Chrome Browser add this property in your “portal-ext.properties” file
Embedding Navigation Portlet into Layout using...
Special thanks to atul patel’s forum post displays how to embed a navigation portlet into a layout using custom settings.
With Custom Settings
Basic display styles:
There are 6 different basic views (source wiki):
looks like breadcrumbs; shows parent page and current page but not siblings
current page only?
shows parent page and all subpages (siblings). The current page is bold....
4 tags
Liferay Layout Thumbnail PSD (Download) →
2 tags
4 tags
Syze: Think @media queries powered by Javascript →
syze is a library for JavaScript that lets you easily target your designs by device or browser sizes. syze makes designing for desktops, televisions, tablets, and mobile devices simultaneously as easy as CSS. syze works before page load so there is no flicker. Size can update on window resize and orientation change - it works cross-browser, cross-device, cross-library and is less than 1KB.
...
1 tag
Ask Questions
Above there is a “Ask me Front-End Liferay Questions” button that will let you send me questions that I will try to answer or send you a link towards some resources.
September 2011
9 posts
3 tags
Embed Web Content by Article Title
If the article ids differ from dev and the prod server this method will grab the articleid from the article title