forked from AlchemyCMS/alchemy_cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow directly rendering nodes We can use Rails' model rendering mechanism to render nodes by changing `to_partial_path` to not point to the wrapper, but to the node itself. This yields a few simplifications. * Adapt generator partials to not use node_partial_path This is now `node.to_partial_path`. * Actually render node when rendering an EssenceNode
- Loading branch information
Showing
15 changed files
with
21 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<%# The content object holds the essence %> | ||
<%= content.ingredient %> | ||
<%= render content.ingredient if content.ingredient %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- cache menu do | ||
%ul.nav | ||
= render partial: options[:node_partial_name], | ||
= render partial: menu.to_partial_path, | ||
collection: menu.children.includes(:page, :children), | ||
locals: { options: options }, | ||
as: 'node' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- cache menu do | ||
ul.nav | ||
= render partial: options[:node_partial_name], | ||
= render partial: menu.to_partial_path, | ||
collection: menu.children.includes(:page, :children), | ||
locals: { options: options }, | ||
as: 'node' |
4 changes: 2 additions & 2 deletions
4
spec/dummy/app/views/alchemy/menus/footer_navigation/_wrapper.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<ul class="nav"> | ||
<%= render partial: options[:node_partial_name], | ||
collection: node.children.includes(:page, :children), | ||
<%= render partial: menu.to_partial_path, | ||
collection: menu.children.includes(:page, :children), | ||
locals: { options: options }, | ||
as: 'node' %> | ||
</ul> |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
spec/dummy/app/views/alchemy/menus/main_menu/_wrapper.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<ul class="nav"> | ||
<%= render partial: menu.to_partial_path, | ||
collection: menu.children.includes(:page, :children), | ||
locals: { options: options }, | ||
as: "node" %> | ||
</ul> |
6 changes: 0 additions & 6 deletions
6
spec/dummy/app/views/alchemy/menus/main_navigation/_wrapper.html.erb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters