if Refinery::Page.where(:menu_match => "^/$").empty? home_page = Refinery::Page.create!({:title => "Home", :deletable => false, :link_url => "/", :menu_match => "^/$"}) home_page.parts.create({ :title => "Body", :body => "
Welcome to our site. This is just a place holder page while we gather our content.
", :position => 0 }) home_page.parts.create({ :title => "Side Body", :body => "This is another block of content over here.
", :position => 1 }) home_page_position = -1 page_not_found_page = home_page.children.create(:title => "Page not found", :menu_match => "^/404$", :show_in_menu => false, :deletable => false) page_not_found_page.parts.create({ :title => "Body", :body => "The page you requested was not found.
", :position => 0 }) end if Refinery::Page.by_title("About").empty? about_us_page = ::Refinery::Page.create(:title => "About") about_us_page.parts.create({ :title => "Body", :body => "This is just a standard text page example. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin metus dolor, hendrerit sit amet, aliquet nec, posuere sed, purus. Nullam et velit iaculis odio sagittis placerat. Duis metus tellus, pellentesque ut, luctus id, egestas a, lorem. Praesent vitae mauris. Aliquam sed nulla. Sed id nunc vitae leo suscipit viverra. Proin at leo ut lacus consequat rhoncus. In hac habitasse platea dictumst. Nunc quis tortor sed libero hendrerit dapibus.\n\nInteger interdum purus id erat. Duis nec velit vitae dolor mattis euismod. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse pellentesque dignissim lacus. Nulla semper euismod arcu. Suspendisse egestas, erat a consectetur dapibus, felis orci cursus eros, et sollicitudin purus urna et metus. Integer eget est sed nunc euismod vestibulum. Integer nulla dui, tristique in, euismod et, interdum imperdiet, enim. Mauris at lectus. Sed egestas tortor nec mi.
", :position => 0 }) about_us_page.parts.create({ :title => "Side Body", :body => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus fringilla nisi a elit. Duis ultricies orci ut arcu. Ut ac nibh. Duis blandit rhoncus magna. Pellentesque semper risus ut magna. Etiam pulvinar tellus eget diam. Morbi blandit. Donec pulvinar mauris at ligula. Sed pellentesque, ipsum id congue molestie, lectus risus egestas pede, ac viverra diam lacus ac urna. Aenean elit.
", :position => 1 }) end (Refinery.i18n_enabled? ? Refinery::I18n.frontend_locales : [:en]).each do |lang| I18n.locale = lang Refinery::Page.find_by_title("Home").update_attributes(:slug => "home") Refinery::Page.find_by_title("Page not found").update_attributes(:slug => "page-not-found") Refinery::Page.find_by_title("About").update_attributes(:slug => "about") end