Module: Templates
- Included in:
- PageTemplate
- Defined in:
- app/models/templates.rb
Overview
Separated into its own file so it can be required in Application Templates and Generators easier.
Class Method Summary collapse
-
.default_body ⇒ Object
Generates a basic empty template for a page.
Class Method Details
.default_body ⇒ Object
Generates a basic empty template for a page.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/models/templates.rb', line 8 def self.default_body html = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n <title><%= page_title %></title>\n <%= yield :html_head %>\n</head>\n<body style=\"margin: 0; padding: 0; text-align: center;\">\n <%= cms_toolbar %>\n <div id=\"wrapper\" style=\"width: 700px; margin: 0 auto; text-align: left; padding: 30px\">\n Breadcrumbs: <%= render_breadcrumbs %>\n Menu: <%= render_menu %>\n <h1><%= page_title %></h1>\n <%= container :main %>\n </div>\n</body>\n</html>\n" html end |