app/views/mcms_pages/pages/show.html.erb in mcms_pages-0.0.4 vs app/views/mcms_pages/pages/show.html.erb in mcms_pages-0.0.5

- old
+ new

@@ -7,37 +7,31 @@ @Last Modification Details : @Purpose : To show the individual page preview, on the basis of layout choosed. --> -<!-- calling helper method to arrange page part of a page --> <% page = arrange_page_part(@page) %> -<% if @page.layout.name == "default" %> +<!-- render partial for header --> +<%= render :partial => 'mcms_pages/layouts/header', :locals => {:p => page["header"]} unless page["header"].nil? %> - <!-- render menu page --> - <%= render :partial => 'mcms_pages/pages/menu' if not @page.link_url == '\404' %> +<!-- render menu page --> +<%= render :partial => 'mcms_pages/pages/menu' if not @page.link_url == '\404' %> - <div id="default-page-main-body" class="page-main-body"> +<!-- render partial _main_body.html.erb --> +<%= + render "mcms_pages/pages/main_body", :p => page["left body"], :side => "left", :layout => layout_name(@page.layout.column_count) unless page["left body"].nil? +%> - <%= render :partial => "mcms_pages/pages/main_body", :locals => {:p => page["main body"]} %> +<!-- render partial _main_body.html.erb --> +<%= + render "mcms_pages/pages/main_body", :p => page["right body"], :side => "right", :layout => layout_name(@page.layout.column_count) unless page["right body"].nil? +%> - </div> +<!-- render partial _main_body.html.erb --> +<%= + render "mcms_pages/pages/main_body", :p => page["main body"], :side => "main", :layout => layout_name(@page.layout.column_count) unless page["main body"].nil? +%> -<% else %> - - <!-- render partial for header --> - <%= render :partial => 'mcms_pages/layouts/header', :locals => {:p => page["header"]} %> - - <!-- render menu page --> - <%= render :partial => 'mcms_pages/pages/menu' if not @page.link_url == '\404' %> - - <!-- render partial on the basis of layout name which is based on column count --> - <%= render :partial => "mcms_pages/pages/"+layout_name(@page.layout.column_count), :locals => {:page => page, :p => @page} %> - - <div style="clear:both;"></div> - - <!-- render partial for footer --> - <%= render :partial => 'mcms_pages/layouts/footer', :locals => {:p => page["footer"]} %> - -<% end %> +<!-- render partial for footer --> +<%= render :partial => 'mcms_pages/layouts/footer', :locals => {:p => page["footer"]} unless page["footer"].nil? %>