0
-class ContentNodes < Application
0
- @content_node = ContentNode[params[:id]]
0
- # Shows an entire page of content by name
0
- #@content_node = ContentNode.with_slug(id)
0
- @content_node = ContentNode.first(:name => params[:name])
0
- raise NotFound unless @content_node
0
- if @content_node.title.blank? then
0
- @title = @content_node.name.capitalize
0
- @title = @content_node.title
0
- # Render special template for blog posts
0
- #if @content_node.type == Blog then
0
- # render(:template => 'content_nodes/blog_post')
0
- #else # Render basic template for regular pages
0
- # render(:layout => 'main')
0
- # Shows a snippet of content
0
- @content_node = Snippet.first(:name => params[:name])
0
- # Shows all blog content nodes.
0
- @content_nodes = Blog.all
0
- #@content_nodes = Blog.paginate(
0
- # :conditions => 'display_on <= CURRENT_DATE',
0
- # :page => params[:page],
0
- # :order => 'display_on DESC, created_on DESC'
0
- display @content_nodes
0
- # Find section, if no section 404...
0
- #@section = Section.find_by_name(params[:section_name])
0
- @section = Section.first(:name => params[:section_name])
0
- raise NotFound unless @section
0
- @title = "Blog entries for #{@section.name}"
0
- # List blog entries by section
0
- # Sets the sections instance variable
0
- @sections = Section.find_ordered_parents
Comments
No one has commented yet.