Allow page parts to use customised presenters

A page part will look for a named presenter and named data.
If found it will use the presenter to present the data.

Collection_presenter is a new presenter which will present any
collection as an unordered list.

This has passed the refinerycms testing, but I haven't written tests for the new behaviour yet.
Noted, and thanks.
-- 
Anita Graham
anita@joli.com.au

From:  Graham Wagener <notifications@github.com>
Reply-To:  refinery/refinerycms
<reply+p-13686047-8967ad486626946bd17c1fe4d7802793058d1aa9-397118@reply.gith
ub.com>
Date:  Thursday, 12 June 2014 11:13 am
To:  refinery/refinerycms <refinerycms@noreply.github.com>
Cc:  Anita Graham <anita@joli.com.au>
Subject:  Re: [refinerycms] Allow page parts to use customised presenters
(#2615)


In pages/app/presenters/refinery/pages/collection_presenter.rb:
> @@ -0,0 +1,50 @@
> +module Refinery
> +  module Pages
> +    class CollectionPresenter < Refinery::Pages::SectionPresenter
> +      include ActiveSupport::Configurable
> +      # presents a collection of items in a section
> +      # TODO do a better fallback_html
> +
> +      attr_accessor :output_buffer
> +      # config_accessor :id, :content_wrapper_id, :content_wrapper_tag,
:collection_class, :collection_tag
Preferably don't leave commented out code in pull requests.

‹
Reply to this email directly or view it on GitHub
<https://github.com/refinery/refinerycms/pull/2615/files#r13686047> .