Add empty frontend view to prevent Joomla from loading jquery and bootstrap javascript

This commit is contained in:
Matias Griese
2015-03-31 19:25:38 +03:00
parent a61c93db08
commit e8bd4a43f5
7 changed files with 43 additions and 0 deletions
+4
View File
@@ -152,6 +152,10 @@
<target name="build-component" depends="build-installer">
<echo message="Building Component..." />
<copy todir="${tmp_dir}/packages/com_gantry5/site" overwrite="true">
<fileset dir="${path.platforms}/joomla/com_gantry5/site"/>
</copy>
<copy todir="${tmp_dir}/packages/com_gantry5/admin" overwrite="true">
<fileset dir="${path.platforms}/common">
<exclude name=".sass-cache/"/>
+2
View File
@@ -13,6 +13,7 @@ if [ -f $GIT_TARGET/configuration.php ]; then
'platforms/joomla/lib_gantry5/gantry5.xml'
'platforms/joomla/gantry5_media/gantry5_media.xml'
# Component
'platforms/joomla/com_gantry5/site'
'platforms/joomla/com_gantry5/admin'
'platforms/common'
# Library
@@ -36,6 +37,7 @@ if [ -f $GIT_TARGET/configuration.php ]; then
'administrator/manifests/libraries/gantry5.xml'
'administrator/manifests/files/gantry5_media.xml'
# Component
'components/com_gantry5'
'administrator/components/com_gantry5'
'administrator/components/com_gantry5/common'
# Library
@@ -10,6 +10,12 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2</license>
<description>COM_GANTRY5_DESCRIPTION</description>
<files folder="site">
<filename>gantry5.php</filename>
<filename>router.php</filename>
<folder>views</folder>
</files>
<administration>
<files folder="admin">
<filename>access.xml</filename>
@@ -1,2 +1,5 @@
COM_GANTRY5="Gantry 5 Themes"
COM_GANTRY5_DESCRIPTION="Gantry 5 component. Needs to be enabled at all times."
COM_GANTRY5_MENU_EMPTY_DEFAULT="Custom Page"
COM_GANTRY5_MENU_EMPTY_DEFAULT_DESC="Displays custom layout without any main content."
@@ -0,0 +1,2 @@
<?php
defined('_JEXEC') or die;
@@ -0,0 +1,20 @@
<?php
defined('_JEXEC') or die ();
function Gantry5BuildRoute(&$query)
{
$segments = array();
unset($query['view']);
return $segments;
}
function Gantry5ParseRoute($segments)
{
if ($segments) {
throw new Exception('Page not found', 404);
}
return array();
}
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<metadata>
<layout title="COM_GANTRY5_MENU_EMPTY_DEFAULT">
<message>COM_GANTRY5_MENU_EMPTY_DEFAULT_DESC</message>
</layout>
</metadata>