Feature #17763

Ability to render multiple partials with view hook

Added by Ilya S over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Plugin API
Target version:3.0.0
Resolution:Fixed

Description

Added ability to render multiple partials with view hook

0001-ability-to-render-multiple-partials-with-view-hook.patch Magnifier (1.24 KB) Ilya S, 2014-08-29 10:30

multiple_render.patch Magnifier (1.87 KB) Jean-Philippe Lang, 2014-10-13 21:03

Associated revisions

Revision 13449
Added by Jean-Philippe Lang over 3 years ago

Ability to render multiple partials with view hook (#17763).

History

#1 Updated by Jean-Baptiste Barth over 3 years ago

Isn't it easier to add a "parent" partial that groups the other ones you'd want to render ? Maybe you can explain why this is needed.

Plus we need to have some tests if we ever want to merge this in.

#2 Updated by Ilya S over 3 years ago

It's easier, in case of multiple partials within one plugin, but if you have multiple plugins using the same hook - it's a problem.

#3 Updated by Ilya S over 3 years ago

any thoughts?

#4 Updated by Jean-Philippe Lang over 3 years ago

This patch assumes that we're rendering partials which is just one of the many #render options.
I'd like something that does not depend on that.

#5 Updated by Jean-Philippe Lang over 3 years ago

Here is another option, feedback is welcome. Basically, the syntax would be:

render_on :some_hook, :partial => "show_more_data" 
render_on :some_hook, {:partial => "show_more_data"}, {:partial => "show_even_more_data"}
render_on :some_hook, {:partial => "show_more_data"}, {:inline => "<%= show_even_more_data %>"}

#6 Updated by Jean-Philippe Lang over 3 years ago

  • Tracker changed from Patch to Feature
  • Subject changed from ability to render multiple partials with view hook to Ability to render multiple partials with view hook
  • Category changed from Core Plugins to Plugin API
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.0.0
  • Resolution set to Fixed

Feature added in r13449.

#7 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from New to Closed

Also available in: Atom PDF