Letzte Blogger

Travis Cory

4 Nachrichten
25. Oktober 2016

David Truong

18 Nachrichten
19. Oktober 2016

Charles Lam

2 Nachrichten
17. Oktober 2016

Kyle Joseph Stiemann

7 Nachrichten
17. Oktober 2016

Marcos Castro

8 Nachrichten
13. Oktober 2016

Olaf Kock

118 Nachrichten
12. Oktober 2016

Sven Werlen

4 Nachrichten
10. Oktober 2016

Sushil Patidar

6 Nachrichten
4. Oktober 2016

Maarten van Heiningen

3 Nachrichten
29. September 2016

Christine Reyes

2 Nachrichten
27. September 2016

Use Custom URL Variables to Display certain Paginated Web Content

Technical Blogs 24. Juli 2014 Von Bradley Wood

Ever wanted to explicitly define what page to display on the current pagination content from a url password?

This code 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.

#set ($friendlyURL = $request.get('attributes').get('CURRENT_COMPLETE_URL'))
#set ($pageId = $httpUtil.getParameter($friendlyURL, 'page"))

#set ($total = $image.siblings.size())

#if($pageId != "" && $getterUtil.getInteger($pageId) <= $total)
     #set($targetPage = $pageId)
     #set($targetPage = $total)

#foreach($image in $image.siblings)
     <img src="${image.data}" />

Pagination JS that can be included in the velocity file
- define page: to be $targetPage

<script type="text/javascript">

AUI().ready('aui-paginator', function(A) {

	var pgA = new A.Paginator({
		page: ${targetPage},
		containers: '.paginatorA',
		total: 10,
		maxPageLinks: 10,
		rowsPerPage: 1,
		circular: true,
		rowsPerPageOptions: [ 1, 3, 5, 7 ],
		on: {
			changeRequest: function(event) {
				var instance = this;
				var newState = event.state;
				var page = newState.page;
				// newState.total = 100;

				if (newState.before) {
					var lastPage = newState.before.page;

					A.one('.contentA .page' + lastPage).setStyle('display', 'none');

				A.one('.contentA .page' + page).setStyle('display', 'block');

				// we need to .setState(newState) or .set(STATE, newState)
				// to update the UI



*note: Have the Pagination JS code in the same template velocity file as the web content.

Embedding Navigation Portlet into Layout using Custom Settings

General Blogs 24. Juli 2014 Von Bradley Wood

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):

  1. looks like breadcrumbs; shows parent page and current page but not siblings
  2. current page only?
  3. shows parent page and all subpages (siblings). The current page is bold. This seems to be the most valuable normal setting.
  4. shows subpages (siblings), no parent
  5. ? looks like 4
  6. Is a full community/org nav. Shows all pages in tier
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$velocityPortletPreferences.setValue("root-layout-type", "absolute")
$velocityPortletPreferences.setValue("bullet-style", "main")
$velocityPortletPreferences.setValue("header-type", "none")
$velocityPortletPreferences.setValue("root-layout-level", "0")
$velocityPortletPreferences.setValue("included-layouts", "all")
$velocityPortletPreferences.setValue("display-style", "")
$theme.runtime("71_INSTANCE_MAIN", "", $velocityPortletPreferences.toString())


Add Responsive Layouts to Liferay 6.1

General Blogs 6. Juni 2014 Von Bradley Wood

One issue has come up time and time again with 6.1, There isn't a built in responsive grid system for Liferay 6.1. Version 6.2 uses twitter bootsrap. Here are 10 pure css layouts that overwrite the default layouts that are provided in Liferay. When the screen is resized all of the columns stack. This is a simple solution to instantly get a responsive website for liferay 6.1.



Overwrite Liferay Logo in Theme

General Blogs 9. Mai 2014 Von Bradley Wood

In every theme that I write I always put this snippet of code in my theme's init_custom.vm file.

## ---------- Logo ---------- ##
#if (($company.getLogoId() == 0) && $use_company_logo)
     #set ($site_logo = "${images_folder}/custom/logo.png")
     #set ($site_logo_height = 69) #set ($site_logo_width = 403)

Gist Link

What this snippet will do is display the site logo if one has been set, If a company logo has been set it will use that, if there isn't a company or site logo, then it uses the logo.jpg in the theme and displays it instead of the default liferay logo.


Please leave a comment below if this was helpful, thanks.


Bradley Wood
Woodbench Media
80W. Sierra Madre Blvd, #109
Sierra Madre, CA 91024


How to enable PACL for marketplace apps.

General Blogs 9. Mai 2014 Von Bradley Wood

Here is a quick refereance for the PACL how to documentation. It was a little hidden, so here is the link for setting it up for 6.1.2 GA3




Bradley Wood
Woodbench Media

Zeige 5 Ergebnisse.