Webmontag Graz Radiant CMS

44
Radiant CMS no fluff, just stuff! Eine Einführung iTeh DI Edmund Siegfried Haselwanter ( offi[email protected] ) Mittwoch, 31. März 2010

Transcript of Webmontag Graz Radiant CMS

Page 1: Webmontag Graz Radiant CMS

Radiant CMSno fluff, just stuff!

Eine Einführung

iTeh DI Edmund Siegfried Haselwanter ([email protected])

Mittwoch, 31. März 2010

Page 2: Webmontag Graz Radiant CMS

Vorstellung

Edmund Haselwanter

seit August 2008 selbständig

Focus auf IT Consulting / Rails und IT Automatisierung

seit ca. 2 Jahren verschiedene Radiant Webseiten online

Mittwoch, 31. März 2010

Page 3: Webmontag Graz Radiant CMS

Warum Radiant?

Zuerst Versuch mit enterprise-level CMS Systemen und Blog Engines wie Wordpress

Zu viele Funktionen, zu kompliziert oder zu unflexibel

Will “einfach” Seiten machen

Ruby/Rails Fan-Boy ;-)

Mittwoch, 31. März 2010

Page 4: Webmontag Graz Radiant CMS

Die 80-20 Regel

Zu 80% verwendet man 20% der Funktionen

Zumeist will man nur “Seiten” erstellen

Radiant bietet Pages, Layouts und Snippets für diese Aufgabe

Der Rest kann mit im Moment ca. 200 Erweiterungen oder einfach selbst programmiert werden

Mittwoch, 31. März 2010

Page 5: Webmontag Graz Radiant CMS

Installation

gem install radiant

radiant meine-webseite

rake db:bootstrap

Mittwoch, 31. März 2010

Page 6: Webmontag Graz Radiant CMS

Admin Interfaceunter /admin

Mittwoch, 31. März 2010

Page 7: Webmontag Graz Radiant CMS

Der Content

Der ContentHierarchische Seitenstruktur

Mittwoch, 31. März 2010

Page 8: Webmontag Graz Radiant CMS

Der Content

Workflow Status

Workflow Statusauf einen Blick Status aller Seiten

Mittwoch, 31. März 2010

Page 9: Webmontag Graz Radiant CMS

Der Content

Workflow Status

Seiten erstellen/löschen

Seitenin der Hierarchie erstellen oder löschen

Mittwoch, 31. März 2010

Page 10: Webmontag Graz Radiant CMS

Mittwoch, 31. März 2010

Page 11: Webmontag Graz Radiant CMS

Titel

Mittwoch, 31. März 2010

Page 12: Webmontag Graz Radiant CMS

TitelUrl Teil

Mittwoch, 31. März 2010

Page 13: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Mittwoch, 31. März 2010

Page 14: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Seiten Teile

Mittwoch, 31. März 2010

Page 15: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Seiten Teile

Filter

Mittwoch, 31. März 2010

Page 16: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Seiten Teile

Filter

Content

Mittwoch, 31. März 2010

Page 17: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Seiten Teile

Filter

Content

Layout

Mittwoch, 31. März 2010

Page 18: Webmontag Graz Radiant CMS

TitelUrl Teil

Breadcrumb

Seiten Teile

Filter

Content

Layout Seiten Typ

Mittwoch, 31. März 2010

Page 19: Webmontag Graz Radiant CMS

LayoutsSite Wireframe - Sind die Templates einer Seite

Mittwoch, 31. März 2010

Page 20: Webmontag Graz Radiant CMS

LayoutsDefinieren Content Type--> Auch XML, CSS, Javascript, ... möglich

Mittwoch, 31. März 2010

Page 21: Webmontag Graz Radiant CMS

SnippetsWiederverwendbare Mini Templates

Mittwoch, 31. März 2010

Page 22: Webmontag Graz Radiant CMS

SnippetsÜber den Namen ansprechbar

Mittwoch, 31. März 2010

Page 23: Webmontag Graz Radiant CMS

Typisches CMS

Content

Header

Footer

Header

Footer

Content

Seite Layout Ergebnis

Mittwoch, 31. März 2010

Page 24: Webmontag Graz Radiant CMS

Ein besseres Model

Header

Footer

Header

Footer

body

Seite Layout Ergebnis

body

sidebar

extended

side

bar

extended

Mittwoch, 31. März 2010

Page 25: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title>Eine Beispielseite</title>

</head> <body>

<div id="header”><img src="logo.gif" /></div> <div id="content">

<h1>Eine Beispielseite</h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <div id="footer">

<p>Copyright 2010, Max Mustermann</p> </div>

</body> </html>

Mittwoch, 31. März 2010

Page 26: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title>Eine Beispielseite</title>

</head> <body>

<div id="header”><img src="logo.gif" /></div> <div id="content">

<h1>Eine Beispielseite</h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <div id="footer">

<p>Copyright 2010, Max Mustermann</p> </div>

</body> </html>

Titel

Mittwoch, 31. März 2010

Page 27: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<div id="header”><img src="logo.gif" /></div> <div id="content">

<h1><r:title/></h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <div id="footer">

<p>Copyright 2010, Max Mustermann</p> </div>

</body> </html>

Mittwoch, 31. März 2010

Page 28: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<div id="header”><img src="logo.gif" /></div> <div id="content">

<h1><r:title/></h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <div id="footer">

<p>Copyright 2010, Max Mustermann</p> </div>

</body> </html>

WiederkehrenderKopfteil

WiederkehrenderFussteil

Mittwoch, 31. März 2010

Page 29: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<r:snippet name="header"/> <div id="content">

<h1><r:title/></h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <r:snippet name="footer"/>

</body> </html>

Mittwoch, 31. März 2010

Page 30: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<r:snippet name="header"/> <div id="content">

<h1><r:title/></h1><p>Das ist eine Beispielseite.</p>

</div><div id="sidebar">

<p>sidebar Sachen kommen hierher</p></div> <r:snippet name="footer"/>

</body> </html>

Seitenleiste

Body

Mittwoch, 31. März 2010

Page 31: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<r:snippet name="header"/> <div id="content">

<h1><r:title/></h1><r:content part="body" /> <r:content part="extended" />

</div><div id="sidebar">

<r:content part="sidebar" /></div> <r:snippet name="footer"/>

</body> </html>

Mittwoch, 31. März 2010

Page 32: Webmontag Graz Radiant CMS

Umsetzung<html>

<head><title><r:title/></title>

</head> <body>

<r:snippet name="header"/> <div id="content">

<h1><r:title/></h1><r:content part="body" /> <r:content part="extended" />

</div><div id="sidebar">

<r:content part="sidebar" /></div> <r:snippet name="footer"/>

</body> </html>

mehr dazu unterhttp://wiki.github.com/radiant/radiant/getting-started

Mittwoch, 31. März 2010

Page 33: Webmontag Graz Radiant CMS

Radiant und Radius

Radius ist eine Tag basierte Template Sprache

Radiant hat im Kern 50 Radius Tags

Sehr einfach erweiterbar durch eigene Tags

http://radius.rubyforge.org/

Mittwoch, 31. März 2010

Page 34: Webmontag Graz Radiant CMS

Radiant Tags Content<r:author/>

<r:breadcrumb/>

<r:breadcrumbs [separator="separator_string"] [nolinks="true|false"]/>

<r:comment/>

<r:content [part="part_name"] [inherit="true|false"] [contextual="true|false"]/>

<r:count/>

<r:cycle values="1, 2, 3" [reset="true|false"] [name="cycle"]/>

<r:date [format="%A, %B %d, %Y"] [for="created_at|now|published_at|updated_at"]/>

<r:escape_html/>

<r:link [anchor="name"] [other attributes...]/>

<r:link [anchor="name"] [other attributes...]>...</r:link>

<r:meta:description [tag="true|false"]/>

<r:meta:keywords [tag="true|false"]/>

<r:meta [tag="true|false"]/>

<r:navigation urls="[Title: url|Title: url]>...</r:navigation>

<r:option/>

<r:rfc1123_date/>

<r:slug/>

<r:snippet name="snippet_name"/>

<r:snippet name="snippet_name">...</r:snippet>

<r:status [downcase='true|false']/>

<r:title/>

<r:url/>

<r:yield/>

Mittwoch, 31. März 2010

Page 35: Webmontag Graz Radiant CMS

Radiant Tags Context<r:page>...</r:page>

<r:children>...</r:children>

<r:children:first>...</r:children:first>

<r:children:last>...</r:children:last>

<r:children:each [offset="number"] [limit="number"] [by="attribute"] [order="asc|desc"] [status="draft|reviewed|published|hidden|all"]>...</r:children:each>

<r:children:each:child>...</r:children:each:child>

<r:parent>...</r:parent>

<r:find url="value_to_find">...</r:find>

<r:random>...</r:random>

Mittwoch, 31. März 2010

Page 36: Webmontag Graz Radiant CMS

Radiant Tags Conditional<r:if_first>...</r:if_first>

<r:unless_first>...</r:unless_first>

<r:if_last>...</r:if_last>

<r:unless_last>...</r:unless_last>

<r:if_parent>...</r:if_parent>

<r:unless_parent>...</r:unless_parent>

<r:if_children [status="published|draft|hidden|reviewed"]>...</r:if_children>

<r:unless_children [status="published|draft|hidden|reviewed"]>...</r:unless_children>

<r:if_content [part="part_name, other_part"] [inherit="true"] [find="any"]>...</r:if_content>

<r:unless_content [part="part_name, other_part"] [inherit="true"] [find="any"]>...</r:unless_content>

<r:if_url matches="regexp" [ignore_case="true|false"]>...</r:if_url>

<r:unless_url matches="regexp" [ignore_case="true|false"]>...</r:unless_url>

<r:if_ancestor_or_self>...</r:if_ancestor_or_self>

<r:unless_ancestor_or_self>...</r:unless_ancestor_or_self>

<r:if_self>...</r:if_self>

<r:unless_self>...</r:unless_self>

<r:if_dev>...</r:if_dev>

<r:unless_dev>...</r:unless_dev>

<r:header [name="header_name"] [restart="name1[;name2;...]>...</r:header>

Mittwoch, 31. März 2010

Page 37: Webmontag Graz Radiant CMS

Beispiel für Conditionals<r:find url="/news"> <r:if_children> <ul> <r:children:each> <li><r:title/></li> </r:children:each> </ul> </r:if_children> <r:unless_children> <p>There are no news stories just now. Please check back later.</p> </r:unless_children></r:find>

Mittwoch, 31. März 2010

Page 38: Webmontag Graz Radiant CMS

Beispiel für Conditionals<r:find url="/news"> <r:if_children> <ul> <r:children:each> <li><r:title/></li> </r:children:each> </ul> </r:if_children> <r:unless_children> <p>There are no news stories just now. Please check back later.</p> </r:unless_children></r:find>

Mittwoch, 31. März 2010

Page 39: Webmontag Graz Radiant CMS

Beispiel für Conditionals<r:find url="/news"> <r:if_children> <ul> <r:children:each> <li><r:title/></li> </r:children:each> </ul> </r:if_children> <r:unless_children> <p>There are no news stories just now. Please check back later.</p> </r:unless_children></r:find>

Mittwoch, 31. März 2010

Page 40: Webmontag Graz Radiant CMS

Beispiel für Conditionals<r:find url="/news"> <r:if_children> <ul> <r:children:each> <li><r:title/></li> </r:children:each> </ul> </r:if_children> <r:unless_children> <p>There are no news stories just now. Please check back later.</p> </r:unless_children></r:find>

Mittwoch, 31. März 2010

Page 41: Webmontag Graz Radiant CMS

Und die restlichen 20% ?Es gibt ca. 200 Erweiterungen (http://ext.radiantcms.org/)

von ein paar Tags bis CRM Integration

nichts dabei? -> selbst schreiben!

Sehr flexibles Extension Interface

Admin Bereich einfach erweiterbar

Radiant Teile mit Ruby Metaprogramming mehr/andere Funktionalität geben

http://wiki.github.com/radiant/radiant/creating-extensions

Mittwoch, 31. März 2010

Page 42: Webmontag Graz Radiant CMS

Populäre Erweiterungen

Paperclipped

Mailer

share_layouts

Gallery

nav

Mittwoch, 31. März 2010

Page 43: Webmontag Graz Radiant CMS

Zusammenfassung

Pros:

Sehr gut geeignet für typische Web Auftritte

flexibel und einfach erweiterbar

Cons:

produktiv einsetzbar, aber erst Version 0.9

Extensions finden und installieren mitunter schwierig

Mittwoch, 31. März 2010

Page 44: Webmontag Graz Radiant CMS

Weiterführende Links

Repo: http://github.com/radiant/radiant

Wiki: http://wiki.github.com/radiant/radiant/

Extensions: http://ext.radiantcms.org/

Viele Extensions auf github.com

irc: #radiantcms channel auf irc.freenode.net

Mailinglist: http://radiantcms.org/mailing-list/

Mittwoch, 31. März 2010