Skip to content

Instantly share code, notes, and snippets.

View farmerbradllc's full-sized avatar

Bradley Wood farmerbradllc

View GitHub Profile
@farmerbradllc
farmerbradllc / structure.xml
Created September 12, 2013 19:18
Vimeo Video Library Web Content Structure and Template
<?xml version="1.0"?>
<root>
<dynamic-element name="video-library-link" type="link_to_layout" index-type="" repeatable="false"/>
<dynamic-element name="display-user-info" type="boolean" index-type="" repeatable="false">
<meta-data>
<entry name="displayAsTooltip"><![CDATA[false]]></entry>
<entry name="required"><![CDATA[false]]></entry>
<entry name="instructions"><![CDATA[]]></entry>
<entry name="label"><![CDATA[Display Video Account User Info]]></entry>

Content

Content is created by putting data into a template. In this case, the data is information, and the template is how that information is displayed. Each data and template are also given a title and tags to make them easier to manage and organize. A title makes something easy to identify, and tags make something easy to group.

In this system, the markup languages of JSON is used to describe the data and the template.

Here is an example of a JSON template file named template.json:

{
@jonathantneal
jonathantneal / 1_2_1_columns.tpl
Created January 24, 2013 21:48
Liferay Layouts in Twitter Bootstrap markup
<div class="columns-1-2-1" id="main-content" role="main">
<div class="row-fluid">
<div class="span12">
$processor.processColumn("column-1", "")
</div>
</div>
<div class="row-fluid">
<div class="span6">
$processor.processColumn("column-2", "")
</div>
@farmerbradllc
farmerbradllc / nav-modified.html
Created October 6, 2011 00:28
Navigation Portlet Default Markup
<div class="nav-menu nav-menu-style-dots" id="aui_3_4_0_1_1965">
<ul class="layouts level-1" id="aui_3_4_0_1_1964">
<li class="open "><a class="open " href="/web/navigation-portlet/home"> home</a></li>
<li class="open selected" id="aui_3_4_0_1_1963">
<a class="open selected" href="/web/navigation-portlet/page1" id="aui_3_4_0_1_1962"> Page1</a>
<ul class="layouts level-2">
<li class="open "><a class="open " href="/web/navigation-portlet/link-a"> Link A</a></li>
<li class="open selected "><a class="open selected " href="/web/navigation-portlet/link-b"> Link B</a></li>
<li class="open "><a class="open " href="/web/navigation-portlet/link-c"> Link C</a></li>
</ul>
@rotty3000
rotty3000 / portal_normal.vm
Created October 4, 2011 22:14
embed navigation tag directly without portlet
## Embedded navigation tag
#set ($navigationTag = $portal.class.forName("com.liferay.taglib.ui.NavigationTag").newInstance())
#set ($V = $navigationTag.setPageContext($pageContext))
#set ($V = $navigationTag.setBulletStyle("main"))
#set ($V = $navigationTag.setDisplayStyle("[custom]"))
#set ($V = $navigationTag.setHeaderType("root-layout"))
#set ($V = $navigationTag.setIncludedLayouts("all"))
#set ($V = $navigationTag.setNestedChildren(1))
#set ($V = $navigationTag.setRootLayoutLevel(1))
#set ($V = $navigationTag.setRootLayoutType("absolute"))
@rotty3000
rotty3000 / Language.properties
Created September 21, 2011 20:12
Extremely Flexible and Light Portal Customization
show-breadcrumb=Show Breadcrumb
portal-main-color=Main Background Color
@rotty3000
rotty3000 / build.xml
Created September 17, 2011 00:47
to add localizations in a theme, add this compile section your your build.xml and the languages in the usual location
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="sevencogs-theme" basedir="." default="deploy">
<import file="../build-common-theme.xml" />
<property name="theme.parent" value="_styled" />
<target name="compile">
<mkdir dir="docroot/WEB-INF/classes"/>