getting the most out of radiant

37
Getting the most out of Radiant ‘cause I had to come up with a title there and then

Upload: jomz83

Post on 22-Jun-2015

1.215 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Getting the most out of Radiant

Getting the mostout of Radiant

‘cause I had to come up with a title there and then

Page 2: Getting the most out of Radiant

Hi!

• 26/m/Ghent

• Co-owner of Gorilla webdesign

• github.com/jomz

• twitter.com/jomz

• hardcoreforkingaction.com

Page 3: Getting the most out of Radiant

Agenda

• Radiant?

• 5 free tips we had to learn by experience

• Where Radiant is going

Page 4: Getting the most out of Radiant

“Radiant is a no-fluff,open source

content management system designed for small teams”

Page 5: Getting the most out of Radiant

Simple admin interface

Page 6: Getting the most out of Radiant

Pages have page parts

Page 7: Getting the most out of Radiant

Snippets can holdre-used markup

Page 8: Getting the most out of Radiant

Layouts and Radius put everything together

Page 9: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 10: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 11: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 12: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 13: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 14: Getting the most out of Radiant

Bring your own meat

• navigation_tags

• nested_layouts

• mailer

• paperclipped

• locked_page_parts

• future_publishing

• wym_editor

• index_page

• trike_tags

• ...

Page 15: Getting the most out of Radiant

Free tip #1:Use nested layouts and part inheriting

Page 16: Getting the most out of Radiant

inside your ‘master’ layout:<div id="content" class="clearfix"> <r:content_for_layout/></div>

Page 17: Getting the most out of Radiant

“1-col” layout:<r:inside_layout name="master"> <div id="content_main"> <r:content /> </div></r:inside_layout>

“2-col” layout:<r:inside_layout name="master"> <div id="content_main"> <r:content part="body" /> </div> <div id="content_sec"> <r:content part="nav_sec" /> <r:content part="content_sec" /> </div></r:inside_layout>

Page 18: Getting the most out of Radiant

<div id="content"> <r:if_content part="breadcrumb" inherit="true"> <div id="breadcrumb"> <r:content part="breadcrumb" inherit="true" /> </div> </r:if_content> <div id="content_main"> <r:content part="pre-body" inherit="true" /> <r:unless_content part="read-more"> <r:content /> </r:unless_content> <r:content part="read-more" /> <r:content part="post-body" inherit="true" /> </div> <r:if_content part="nav-sec, content-sec" inherit="true" find="any"> <div id="content_sec"> <r:content part="nav-sec" inherit="true" /> <r:content part="content-sec" inherit="true" /> </div> </r:if_content></div>

Page 19: Getting the most out of Radiant

<div id="content"> <r:if_content part="breadcrumb" inherit="true"> <div id="breadcrumb"> <r:content part="breadcrumb" inherit="true" /> </div> </r:if_content> <div id="content_main"> <r:content part="pre-body" inherit="true" /> <r:unless_content part="read-more"> <r:content /> </r:unless_content> <r:content part="read-more" /> <r:content part="post-body" inherit="true" /> </div> <r:if_content part="nav-sec, content-sec" inherit="true" find="any"> <div id="content_sec"> <r:content part="nav-sec" inherit="true" /> <r:content part="content-sec" inherit="true" /> </div> </r:if_content></div>

Page 20: Getting the most out of Radiant

Free tip #2:Keep radius tags away from your (dumb) clients

Page 21: Getting the most out of Radiant

Free tip #3:Use fragment caching for larger sites

Page 22: Getting the most out of Radiant
Page 23: Getting the most out of Radiant

Free tip #4:Keep your radius tidy

Page 24: Getting the most out of Radiant

<a href="<r:url />"><r:title /></a> and<a href="<r:url />" class="foo">To another page</a>

could be written as

<r:link /> and<r:link class="foo">To another page</r:link>

Page 25: Getting the most out of Radiant

<r:parent><r:url /></r:parent>

could be written as

<r:parent:url />

Page 26: Getting the most out of Radiant

<ul><r:children:each><r:unless_url matches="foo"> ...</r:unless_url></r:children:each></ul>

could be written as

<ul><r:children:each:unless_url matches="foo"> ...</r:children:each:unless_url></ul>

Page 27: Getting the most out of Radiant

<r:parent> <r:assets:each limit="1"> <r:link /> </r:assets:each></r:parent>

could be written as

<r:parent:assets:first:link />

Page 28: Getting the most out of Radiant

Free tip #5:Snippets can “yield”

Page 29: Getting the most out of Radiant

make_popup snippet:<div class="popup_box"> <a class="close_popup_link">x</a> <r:yield/></div>

call with a double tag:<r:snippet name="make_popup"> Content for my snippet</r:snippet>

Page 30: Getting the most out of Radiant

A real life example

Page 31: Getting the most out of Radiant

If you do need towrite an extension

• Use shared_layouts extension so you don’t have to use (and maintain) a rails layout

• Freeze radiant so that you can see what you are doing ( )

• Let your backend controller inherit from Admin::ResourceController for freeCRUD actions and flash messages

• Upload to github to receive free updates

Page 32: Getting the most out of Radiant

What’s happening in Radiant world?

Page 33: Getting the most out of Radiant

Radiant extensions can now be gems!

• Gems have a nice dependency system

• One ‘gem update’ can bring several Radiant instances up to date

Page 34: Getting the most out of Radiant

Radiant 0.9 coming up!

• Brand new interface with reworked tabs

• Internationalisation (for the backend)

• On Rails 2.3.5, working on Rails 3

Page 35: Getting the most out of Radiant

Radiant extensions may soon be engines!

• Spree (e-commerce platform) has an extension system based on that of Radiant

• Radiant and Spree communities are looking into a joint effort to bring extensions to the next level (engines or something like it)

Page 36: Getting the most out of Radiant

some Github profilesto keep an eye on

• github.com/radiant

• github.com/saturnflyer

• github.com/kbingman

• github.com/spanner

• github.com/jgarber

• github.com/johnmuhl

Page 37: Getting the most out of Radiant

Questions?