diff --git a/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html b/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html
new file mode 100644
index 000000000..e071e6935
--- /dev/null
+++ b/e107_themes/bootstrap3/layouts/jumbotron_sidebar_right_layout.html
@@ -0,0 +1,56 @@
+ {SETSTYLE=default}
+
diff --git a/e107_themes/bootstrap3/layouts/modern_business_home_layout.html b/e107_themes/bootstrap3/layouts/modern_business_home_layout.html
new file mode 100644
index 000000000..f6e7d59bf
--- /dev/null
+++ b/e107_themes/bootstrap3/layouts/modern_business_home_layout.html
@@ -0,0 +1,112 @@
+
+ {SETSTYLE=none}
+
+ {FEATUREBOX}
+
+
+ {ALERTS}
+
+ {MENU=10}
+
+
+
+
+
+
+
+ {SETSTYLE=col-md-4}
+ {CMENU=jumbotron-menu-1}
+ {CMENU=jumbotron-menu-2}
+ {CMENU=jumbotron-menu-3}
+
+
+
+
+{SETSTYLE=default}
+
+
+
+
+
+
+
+
+
+
+
+
Display Some Work on the Home Page Portfolio
+
+
+
+ {SETSTYLE=portfolio}
+ {SETIMAGE: w=400&h=400&crop=1}
+ {GALLERY_PORTFOLIO: placeholder=1&limit=6}
+
+
+
+
+
+
+
+
+
+{SETSTYLE=none}
+
+
+
+
+
+
+
+ {CMENU=feature-menu-1}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {CMENU=feature-menu-2}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {CMENU=feature-menu-3}
+
+
+
+
+
+
+
+
+
+
+
+ {---}
diff --git a/e107_themes/bootstrap3/theme.html b/e107_themes/bootstrap3/theme.html
new file mode 100644
index 000000000..da386b4ab
--- /dev/null
+++ b/e107_themes/bootstrap3/theme.html
@@ -0,0 +1,95 @@
+
+
+{---MODAL---}
+
+
+
+
+
+ {NAVIGATION=main}
+ {BOOTSTRAP_USERNAV: placement=top}
+
+
+
+
+
+{---HEADER---}
+
+
+{---LAYOUT---}
+
+
+
+
+{SETSTYLE=default}
+
+
+
+
+
+
+ {MENU=100}
+
+
+ {MENU=101}
+
+
+
+
+
+ {MENU=102}
+
+
+
+ {MENU=103}
+
+
+
+
+
+
+
+ {MENU=105}
+ {NAVIGATION=footer}
+ {MENU=106}
+
+
+ {XURL_ICONS: size=2x}
+ {BOOTSTRAP_USERNAV: placement=bottom&dir=up}
+
+
+
+
+
+
+
+
+
+
+
+
+{---FOOTER---}
+
+
+
+
diff --git a/e107_themes/bootstrap3/theme.php b/e107_themes/bootstrap3/theme.php
index ab99eb719..0d9fbdf74 100644
--- a/e107_themes/bootstrap3/theme.php
+++ b/e107_themes/bootstrap3/theme.php
@@ -56,579 +56,124 @@ define('OTHERNEWS2_LIMIT', 3); // Limit to 3.
define('COMMENTOFFSTRING', '');
define('PRE_EXTENDEDSTRING', '
');
-
-/**
- * @param string $caption
- * @param string $text
- * @param string $id : id of the current render
- * @param array $info : current style and other menu data.
- */
-function tablestyle($caption, $text, $id='', $info=array())
+
+class bootstrap3_theme
{
-// global $style; // no longer needed.
-
- $style = $info['setStyle'];
-
- echo "\n\n";
-
- $type = $style;
- if(empty($caption))
- {
- $type = 'box';
- }
-
- if($style == 'navdoc' || $style == 'none')
- {
- echo $text;
- return;
- }
-
- /*
- if($id == 'wm') // Example - If rendered from 'welcome message'
- {
-
- }
-
- if($id == 'featurebox') // Example - If rendered from 'featurebox'
- {
-
- }
- */
-
-
- if($style == 'jumbotron')
- {
- echo '
-
';
- if(!empty($caption))
- {
- echo '
'.$caption.' ';
- }
- echo '
- '.$text.'
-
-
';
- return;
- }
-
- if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8')
- {
- echo '
';
-
- if(!empty($caption))
- {
- echo '
'.$caption.' ';
- }
-
- echo '
- '.$text.'
- ';
- return;
-
- }
-
- if($style == 'menu')
- {
- echo '
-
'.$caption.'
-
- '.$text.'
-
-
';
- return;
-
- }
-
- if($style == 'portfolio')
- {
- echo '
-
+
+ /**
+ * @param string $caption
+ * @param string $text
+ * @param string $id : id of the current render
+ * @param array $info : current style and other menu data.
+ */
+
+ function tablestyle($caption, $text, $id='', $info=array())
+ {
+ // global $style; // no longer needed.
+
+ $style = $info['setStyle'];
+
+ echo "\n\n";
+
+ $type = $style;
+ if(empty($caption))
+ {
+ $type = 'box';
+ }
+
+ if($style == 'navdoc' || $style == 'none')
+ {
+ echo $text;
+ return;
+ }
+
+ /*
+ if($id == 'wm') // Example - If rendered from 'welcome message'
+ {
+
+ }
+
+ if($id == 'featurebox') // Example - If rendered from 'featurebox'
+ {
+
+ }
+ */
+
+
+ if($style == 'jumbotron')
+ {
+ echo '
+
';
+ if(!empty($caption))
+ {
+ echo '
'.$caption.' ';
+ }
+ echo '
+ '.$text.'
+
+
';
+ return;
+ }
+
+ if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8')
+ {
+ echo '
';
+
+ if(!empty($caption))
+ {
+ echo '
'.$caption.' ';
+ }
+
+ echo '
'.$text.'
- ';
- return;
- }
-
-
-
- // default.
-
- if(!empty($caption))
- {
- echo '
'.$caption.' ';
- }
-
- echo $text;
-
-
-
- return;
-
-
-
+
';
+ return;
+
+ }
+
+ if($style == 'menu')
+ {
+ echo '
+
'.$caption.'
+
+ '.$text.'
+
+
';
+ return;
+
+ }
+
+ if($style == 'portfolio')
+ {
+ echo '
+
+ '.$text.'
+
';
+ return;
+ }
+
+
+
+ // default.
+
+ if(!empty($caption))
+ {
+ echo '
'.$caption.' ';
+ }
+
+ echo $text;
+
+
+
+ return;
+
+
+
+ }
+
+
}
-// applied before every layout.
-$LAYOUT['_header_'] = '
-
-
-
-
- {NAVIGATION=main}
- {BOOTSTRAP_USERNAV: placement=top}
-
-
-
-
-
-
-';
-
-// applied after every layout.
-$LAYOUT['_footer_'] = '
-
-';
-
-
-
-// $LAYOUT is a combined $HEADER and $FOOTER, automatically split at the point of "{---}"
-
-$LAYOUT['jumbotron_home'] = <<