This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2009-05-07 17:18:16 +00:00
|
|
|
class PagesController < ApplicationController
|
|
|
|
|
2009-06-01 06:20:15 +00:00
|
|
|
def index
|
2009-06-01 06:52:37 +00:00
|
|
|
@page = Page.find_by_name('root')
|
2009-06-01 06:20:15 +00:00
|
|
|
if @page
|
|
|
|
render_liquid_page
|
|
|
|
else
|
|
|
|
render :text => 'You need a home page'
|
|
|
|
end
|
|
|
|
end
|
2009-05-07 18:13:27 +00:00
|
|
|
|
2010-01-11 09:09:50 +00:00
|
|
|
def show
|
2010-02-11 08:46:20 +00:00
|
|
|
@page = Page.find_by_full_name(params[:page_name].join("/"))
|
2010-01-18 08:23:33 +00:00
|
|
|
render_liquid_page
|
2009-05-07 17:18:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|