Posted by jantoine on July 14, 2011 at 9:53am
27 followers
Jump to:
| Project: | Omega |
| Version: | 7.x-3.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | himerus |
| Status: | active |
Issue Summary
I used drush to create an Omega sub-theme. When the site is set to offline, the maintenance page is not including any CSS from the Omega sub-theme which is set as the default. I know that the Omega sub-theme is being used because my themes logo appears. A custom maintenance-page.tpl.php would also be handy so the CSS styles apply properly (the Drupal default maintenance-page.tpl.php does not produce html matching the rest of the site).
Cheers,
Antoine
Comments
#1
Same here. Subscribing.
#2
Same here... also subscribing.
#3
I have the same problem - but I did my theme from scratch without Omega. This seems to be a more general problem...
Update: I found a Solution (not sure, if this here is the same Problem)
#4
Where is the maintenance-page.tpl.php ? I can't find it.
Thanks.
#5
i am also missing a maintenance-page.tpl.php. still hoping to receive an answer, although this issue is quite old.
#6
Like to know as well.
#7
#8
I'd also like to see this feature!
#9
Giving this a nudge. I am trying to put a site up with Omega. Trying to use the offline maintenance page as a "Coming Soon" page. Followed prior SOP and put a copy of the maintenance-page.tpl.php into subtheme folder, etc. Doesn't work. Anybody have any ideas on how to customize this page, and if there is anything special I need to do in Omega, would love to hear them.
#10
A pro base theme like this really needs this basic feature. Following and subscribing and requesting...
#11
Could someone explain to me, a novice user of omega, how to modify the lay-out of the maintenance-page? For instance, I would like to insert an image and a link to the page. Where can I put this?
I think I should use the delta and context module, but it's not clear to me how to begin exactly?
#12
If you know some HTML, just put an image (or whatever you want) in 'admin/config/development/maintenance'.
#13
I think this is a basic need.
The website looks totally unprofessional in maintenance mode.
I tried copying the page.tpl.php from the alpha folder to my theme folder (under "templates"), but that gave a blank page.
Instead I've put this in
modules/system/system.theme.cssfor the time being:/** maintenance page **/
.maintenance-page{
background: #333;
color: #fff;
font: 14px Arial, Helvetica, sans-serif;
}
.maintenance-page a{
color: #D62026;
text-decoration: none;
}
#14
Well, u can add your custom stylesheet link into
<head>tag in maintenance-page.tpl.php of your theme.Example:
<link rel="stylesheet" href="sites/all/themes/YOURTHEME/css/YOURSPECIALSTYLESHEET.css"/>It will work :)
#15
Code of my maintenance-page.tpl.php
<?php/**
* @file
* Implementation to display a single Drupal page while offline.
*
* All the available variables are mirrored in page.tpl.php.
*
* @see template_preprocess()
* @see template_preprocess_maintenance_page()
* @see bartik_process_maintenance_page()
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="sites/all/themes/sad_but_true/css/offline.css"/>
</head>
<body>
<div class="maintain">
<div class="icon"></div>
<p class="sorry">Your content</p>
<p class="something"><a href="api.drupal.org" title="">Drupal API</a></p>
</div>
<div class="copy"><i><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a></i> - 2012</div>
</body>
</html>
And my stylesheet code:
body {color: #bdb7b1;
background: #2d2d2d;
}
a:link {
color: #fff;
}
a:hover {
color: #fff;
}
a:visited {
color: #fff;
}
.maintain {
width: 550px;
margin: 0 auto;
margin-top: 20px;
padding-bottom: 20px;
}
.maintain p.sorry {
font-size: 30px;
font-weight: bold;
}
.maintain p.something {
font-size: 14px;
font-style: italic;
line-height: 26px;
}
.icon {
background: transparent url(maintainicon.png) no-repeat top left;
width: 128px;
height: 128px;
margin: 0 auto;
border: 1px solid #777;
-webkit-box-shadow: 1px 0px 5px 5px rgba(0, 0, 0, 0.4);
box-shadow: 1px 0px 5px 5px rgba(0, 0, 0, 0.4);
}
.copy {
width: 300px;
margin: 0 auto;
text-align: center;
line-height: 40px;
}
#16
#15 works for me, thanks.
So in fact, the page code from #15 is not from a page.tpl.php in the Omega theme folder, but from the default Drupal theme?
#17
knalstaaf, I think you can pick one of the maintenance-page.tpl.php files in any of the default themes loaded by Drupal [it looks like Seven and Garland each have one] and throw that in your templates folder in your Omega subtheme. I had to theme the tpl.php file with inline CSS, though, because even when I define a custom stylesheet to be called when in maintenance mode, it will only be applied to the inner pages of the site, not the maintenance page itself.
#18
#16,
Slighty modified, but it is.
#19
Changing to a feature request. May not make it into 3.2 but would be good for future inclusion at some point.
#20
Once cause of a broken maintenance page (when using maintenance-page--offline.tpl.php) is #1722586: Additional uncaught exception when site is offline, causes broken maintenance template.
#21
Also note that if you are using an installation profile, and your theme lives in profiles/myprofile/themes, then you also need the following in your settings.php file:
$conf['install_profile'] = 'myprofile';#22
Any progress on this yet?
#23
Just thought I'd put in my solution for this scenario.. This doesn't require any coding and is also a useful practice when launching a site.
Instead of putting the site in offline mode use the Content Access module.
I've created a new content type called landing page and created one article for this content type. I've set this as the new Landing Page in the Site Settings. I've then limited the access to other content types to only authenticated and admin users. I have only one menu block to the left with the region 'force render' unchecked so that this new page fills the screen.
You could go further with the layout by either using the context and delta to play with the layout of the landing page. Or alternatively create some template files for the new Landing Page content type.
To take live I can adjust the access to the other content types, then edit the default landing page settings.
hope this helps
#24
I went with #15's option and modified the maintenance page code as necessary. Worked like a charm.
#25
I've created a maintenance-page.tpl.php in my omega subtheme. So far so good. But I just can't get any of the theme or subtheme stylesheets! All scripts are loaded. So the question is:
Why ain't $styles variable loading any stylesheet of the theme or subtheme? I've looked at Garland and/or Bartik and both themes load themes stylesheet in the maintenance page. There might be something I'm missing out here.
#26
I was going crazy cause none of these worked in my subtheme, theme, or templates folder.
The only solution I found was to replace /modules/system/maintenance-page.tpl.php with my custom template. Just figured I would post in case anyone else had this problem.
#27
The hooks in template.php are missing. I found a solution to at least a maintenance page for a subtheme.
Result is that both theme and css file are used and that is what we wanted here, isn't it? I don't have the time to try it but may be it is sufficient that this is done in the Omega parent theme and that would then get in the direction of the feature patch we are looking for.