Reputation: 432
I need to make an "under construction" page for the home page.
All of the templates I have created use the default Page.ss to build the head/nav and footer. but in the construction page I don't want to do that.
How can I omit the use of Page.ss in my new page type?
This is my Page.ss that is used as the foundation to create every page type
<!doctype html>
<html lang="en">
<head>
<% base_tag %>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
$MetaTags
</head>
<body>
<% include GraphicHeader %>
<% include HeadNav %>
$Layout
<% include Footer %>
</body>
Upvotes: 2
Views: 264
Reputation: 4626
You have two files called Page.ss in your theme.
<head>
and <body>
)$Layout
variable and defines the inner structure per page type.Your Page_Controller
automatically tries to render itself using a template called like it's related Page class (e.g. HomePage) and searches for the Layout and basic template. If it doesn't find one, it falls back to to templates named like the parent class etc. until it finds your Page.ss
.
This is valid for both templates, the outer and the inner layout.
So if your class for the home page is called HomePage
simply put a HomePage.ss inside /themes/yourtheme/templates/ and it's taken by HomePage
and its subclasses.
Using the maintenance module (see Robbie Averill's answer) might be a more robust solution in your case.
Upvotes: 2