This is Part 3 of a series of tutorials on Joomla's offline page:

  • Part 1 (Beginner): Take your Joomla site offline
  • Part 2 (Intermediate): Customize your Joomla offline page
  • Part 3 (Advanced): Create a new Joomla offline page

Joomla allows a site to be taken offline with a setting in the Administrator Global Configuration panel.  When this happens, frontend access is no longer permitted and a special offline page is displayed. 

How is the Offline Page Created?

By default, the offline page is created from the System Template.  You'll find a file called offline.php in the /templates/system/ folder. The file itself is fairly straight-forward and can be divided into five parts:

Joomla Offline Page

Part 1. This single line provides error messages, for example if you try to login but enter the wrong information:

1.<jdoc:include type="message" />

Part 2. This places a Joomla logo on the page:

1.<div id="frame" class="outline">
2. 
3.<img src="http://www.ostraining.com/cdn/joomla_logo_black.jpg" alt="Joomla! Logo" align="middle" />

Part 3. This places your site name on the page:

1.<h1>
2.<?php echo $mainframe->getCfg('sitename'); ?>
3.</h1>

Part 4. This places an offline message on the page:

1.<p>
2. 
3.<?php echo $mainframe->getCfg('offline_message'); ?>
4.</p>

Part 5. This final and longest part of the code places a login box. This code runs from:

1.<?php if(JPluginHelper::isEnabled('authentication', 'openid')) : ?>

all the way down to:

1.<?php echo JHTML::_( 'form.token' ); ?>

Creating Your Own Joomla Offline Page

You could of course just edit the default offline.php but you'd lose any changes as soon you upgraded your Joomla site. The best way to do this is to create a file called offline.php in your template folder. Copy the following files:

  • /templates/system/offline.php
  • /templates/system/css/offline.css
  • /templates/system/css/offline_rtl.css

and add those file to:

  • /templates/your_template/offline.php
  • /templates/your_template/css/offline.css
  • /templates/your_template/css/offline_rtl.css

This will give you a platform to safely customize the files.

Login to post comments

advertise with us

Boost your traffic and expand your pool of potential customers

8000 active members

Ready to join Now?

CMS Portal - The free marketplace for submitting Joomla, Drupal, Wordpress, Magento, phpBB, Prestashop, vBulletin, Opencart Templates and more.

FOLLOW US

Email Newsletters

Make sure you don't miss interesting happenings by joining our newsletter program.
konya escort eskisehir escort canakkale escort samsun escort balikesir escort aydin escort hatay escort kahramanmaras escort giresun escort tokat escort
Joomla Templates Free Joomla Templates Virtuemart Templates K2 Templates JoomShopping Templates HikaShop Templates SobiPro Templates OpenCart Themes
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes
bettilt
tempobet