Skip to content

Instantly share code, notes, and snippets.

View farmerbradllc's full-sized avatar

Bradley Wood farmerbradllc

View GitHub Profile
@farmerbradllc
farmerbradllc / gist:3453283
Created August 24, 2012 17:37
markdown test

Testing 1.2.3

@farmerbradllc
farmerbradllc / init_custom.vm
Created August 15, 2012 19:26
Add language keys in the theme via velocity
#set ($languageResources = $portal.getClass().forName("com.liferay.portal.language.LanguageResources"))
#set ($VOID = $languageResources.putLanguageMap($locale, {"liferay-1": "Liferay 1 2 3", "liferay-2": "Liferay is cool fdfdfdfs"}))
@farmerbradllc
farmerbradllc / .vm
Created August 10, 2012 22:48
Dynamic Data List get approved records
$record.getStatus() == 0 is approved
@farmerbradllc
farmerbradllc / footer.vm
Created August 9, 2012 18:26
display footer navigation
<%--
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
@farmerbradllc
farmerbradllc / template.vm
Created July 13, 2012 18:05
Sample Template
##
## Velocity Transform Template
##
## All dynamic elements in a structure can be accessed as a Velocity variable.
##
## The given structure:
##
## <root>
## <dynamic-element name="main-text" type="text_area">
## <dynamic-element name="sub-image" type="image"></dynamic-element>
@farmerbradllc
farmerbradllc / index.html
Created July 12, 2012 22:40
Email from Web Content
<form method="post">
<input type="hidden" name="submit" value="Submitted"/>
<input type="submit" value="Submit" />
</form>
@farmerbradllc
farmerbradllc / init_custom.vm
Created July 11, 2012 23:56
Grab Organization Logo
//Get Services
#set ($organizationLocalService = $serviceLocator.findService('com.liferay.portal.service.OrganizationLocalService'))
#set ($imageLocalService = $serviceLocator.findService('com.liferay.portal.service.ImageLocalService'))
#set($organizations = $user.getOrganizations())
#set ($defaultOrganization = $organizationLocalService.getOrganizations(0,1))
#if($organizations.size() > 0)
#set($organizations = $organizations.get(0))
#else
@farmerbradllc
farmerbradllc / sitemap.json
Created June 15, 2012 18:41
Web Form Portlet Preferences
sendAsEmail = "false"
fieldLabel4 = "Comments"
emailFromAddress = "[email protected]"
emailAddress =
fieldOptional1 = "false"
fieldValidationScript1 =
successURL =
emailFromName = "Test Test"
description = "Your input is valuable to us. Please send us your suggestions.
requireCaptcha = "false"
<!DOCTYPE html>
<html>
<head>
<script src="../../build/aui/aui.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skin-classic/css/aui-skin-classic-all-min.css" type="text/css" media="screen" />
<style type="text/css" media="screen">
body {