<?php use Antfuentes\Titan\Joomla; use Antfuentes\Titan\Framework; $article = new Joomla\Article(); $string = new Framework\String(); $h = new Framework\Html(); $article->sectionContent($this->articleAlias, $this->sectionAlias); $introtext = $string->breakExplode($article->introtext); $h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('div', 0, 1, '', '{"class":"col col-xs-12 bg-div", "data-min-height":"35"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('div', 0, 1, '', '{"class":"col col-center col-xs-8 div"}'); $h->b('ul', 0, 1, '', '{"class":"col col-xs-12 ul"}'); $string->breakByGroupSize(1, $introtext, __DIR__, 'logos'); $h->b('ul', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1);
$article->sectionContent($this->articleAlias, $this->sectionAlias); $introtext = $string->breakExplode($article->introtext); $introtextSlice = array_slice($introtext, 4); $h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('div', 0, 1, '', '{"class":"col col-xs-12"}'); $h->b('h1', 0, 1, '', '{"class":"h1 col col-xs-12"}'); $h->e(1, trim($introtext[0])); $h->b('h1', 1, 1); $h->b('div', 0, 1, '', '{"class":"left-img-col col col-xs-2", "data-mh":"home-section-3-col"}'); $h->b('div', 0, 1, '', '{"class":"left-img", "style":"background-image:url(' . trim($introtext[2]) . ')"}'); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"left-col col col-xs-6", "data-mh":"home-section-3-col"}'); $h->b('ul', 0, 1, '', '{"class":"left-list row"}'); $string->breakByGroupSize(3, $introtextSlice, __DIR__, 'list'); $h->b('ul', 1, 1); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"right-col col col-xs-2", "data-mh":"home-section-3-col"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('video', 0, 1, '', '{"class":"right-video", "src":"' . trim($introtext[1]) . '", "autoplay ":"", "loop":""}'); $h->e(1, 'Your browser does not support the video element.'); $h->b('video', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"right-img-col col col-xs-2", "data-mh":"home-section-3-col"}'); $h->b('div', 0, 1, '', '{"class":"test col col-xs-12", "data-mh":"home-section-3-col"}'); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"right-img", "style":"background-image:url(' . trim($introtext[3]) . ')"}'); $h->b('div', 1, 1); $h->b('div', 1, 1);
use Antfuentes\Titan\Framework; $article = new Joomla\Article(); $string = new Framework\String(); $h = new Framework\Html(); $article->sectionContent($this->articleAlias, $this->sectionAlias); $introtext = $string->breakExplode($article->introtext); $introtextSlice = array_slice($introtext, 2); $row = '{"class":"row", "data-min-height":"70"}'; $vertical = '{"class":"vertical"}'; $container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}'; $title = '{"class":"title col col-xs-12"}'; $content = '{"class":"content col col-xs-12"}'; $form = '{"class":"form row", "method":"post", "action":"/"}'; $list = '{"class":"list col col-xs-12"}'; $h->b('div', 0, 1, '', $row); $h->b('div', 0, 1, '', $vertical); $h->b('div', 0, 1, '', $container); $h->b('h2', 0, 1, '', $title); $h->e(1, $introtext[0]); $h->b('h2', 1, 1); $h->b('p', 0, 1, '', $content); $h->e(1, $introtext[1]); $h->b('p', 1, 1); $h->b('form', 0, 1, '', $form); $h->b('dl', 0, 1, '', $list); $string->breakByGroupSize(1, $introtextSlice, __DIR__, 'items'); $h->b('dl', 1, 1); $h->b('form', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1);
<?php //ARTICLE //FAQ //SECTION #1 use Antfuentes\Titan\Joomla; use Antfuentes\Titan\Framework; $article = new Joomla\Article(); $string = new Framework\String(); $h = new Framework\Html(); $article->sectionContent($this->articleAlias, $this->sectionAlias); $row = '{"class":"row", "data-min-height":"30"}'; $vertical = '{"class":"vertical"}'; $container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}'; $h->b('div', 0, 1, '', $row); $h->b('div', 0, 1, '', $vertical); $h->b('div', 0, 1, '', $container); $string->breakByGroupSize(2, $string->breakExplode($article->introtext), __DIR__, 'boxes'); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1);
<?php use Antfuentes\Titan\Joomla; use Antfuentes\Titan\Framework; $article = new Joomla\Article(); $db = new Joomla\Database(); $string = new Framework\String(); $h = new Framework\Html(); $article->sectionContent($this->articleAlias, $this->sectionAlias); $wallop = '{"class":"Wallop"}'; $wallopList = '{"class":"Wallop-list"}'; $wallopNext = '{"class":"next fa fa-arrow-circle-o-right"}'; $wallopPervious = '{"class":"previous fa fa-arrow-circle-o-left"}'; $wallopPagination = '{"class":"Wallop-pagination"}'; $itemsArray = $string->breakExplode($article->introtext); $h->b('div', 0, 1, '', $wallop); $h->b('div', 0, 1, '', $wallopList); $string->breakByGroupSize(3, $itemsArray, __DIR__, 'items'); $h->b('i', 0, 1, '', $wallopNext); $h->b('i', 1, 1); $h->b('i', 0, 1, '', $wallopPervious); $h->b('i', 1, 1); $h->b('div', 1, 1); $h->b('ul', 0, 1, '', $wallopPagination); $string->breakByGroupSize(3, $itemsArray, __DIR__, 'dots'); $h->b('ul', 1, 1); $h->b('div', 1, 1);
<?php //ARTICLE //FAQ //SECTION #3 use Antfuentes\Titan\Joomla; use Antfuentes\Titan\Framework; $article = new Joomla\Article(); $string = new Framework\String(); $h = new Framework\Html(); $article->sectionContent($this->articleAlias, $this->sectionAlias); $introtext = $string->breakExplode($article->introtext); $content = array_slice($introtext, 1); $row = '{"class":"row", "data-min-height":"50"}'; $vertical = '{"class":"vertical"}'; $container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}'; $title = '{"class":"title col-xs-12"}'; $list = '{"class":"list acc-list"}'; $h->b('div', 0, 1, '', $row); $h->b('div', 0, 1, '', $vertical); $h->b('div', 0, 1, '', $container); $h->b('h1', 0, 1, '', $title); $h->e(1, $introtext[0]); $h->b('h1', 1, 1); $h->b('ul', 0, 1, '', $list); $string->breakByGroupSize(2, $content, __DIR__, 'questions'); $h->b('ul', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1);
function breakExplode($string) { //$results = explode('{BREAK}', $array); //below uses regex - can use {BREAK<anything>} in introtext $results = preg_split("/{BREAK(?:.*)}/i", $string); return $results; } $breakArray = breakExplode($article->introtext); $title = trim($breakArray[0]); $backgroundImageSrc = trim($breakArray[1]); $content = array_slice($breakArray, 2); //start //$h->b(something) $h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70", "style":"background-image:url(' . $backgroundImageSrc . ')"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('div', 0, 1, '', '{"class":"col col-sm-8 col-center"}'); $h->b('div', 0, 1, '', '{"class":"col col-sm-12", "style": "margin-bottom: 90px; margin-top: 140px; padding: 40px"}'); $h->b('h1', 0, 1, '', '{"class":"h1 col col-xs-12", "style":"padding-bottom: 20px; font-size: 4em;"}'); $h->e(1, $title); $h->b('h1', 1, 1); $h->b('div', 0, 1, '', '{"class":"left-img-col col col-xs-2", "data-mh":"home-section-2-col"}'); $h->b('div', 0, 1, '', '{"class":"left-img", "style":"", "data-mh":"home-section-2-col"}'); $h->b('div', 1, 1); $h->b('div', 1, 1); $string->breakByGroupSize(6, $content, __DIR__, 'service'); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); //end //$h->b(something)
$h->b('img', 0, 1, '', '{"class":"col col-xs-12 image", "src":"' . $img->image_fulltext . '", "alt":"' . $img->image_fulltext_alt . '"}'); $h->b('div', 0, 1, '', '{"style":"background-image: url(' . $img->image_fulltext . ')", "class":"div-img"}'); $h->b('div', 1, 1); $h->b('figcaption', 0, 1, '', '{"class":"figcaption"}'); $h->b('hgroup', 0, 1, '', '{"class":"col col-center col-xs-8", "id":"hgroup"}'); $h->b('h2', 0, 1, '', '{"id":"h2"}'); $h->e(1, $introtext[0]); $h->b('h2', 1, 1); $h->b('h3', 0, 1, '', '{"id":"h3"}'); $h->e(1, $introtext[1]); $h->b('h3', 1, 1); $h->b('hgroup', 1, 1); $h->b('figcaption', 1, 1); $h->b('figure', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"col col-xs-8 right", "data-mh":"artists-article-div"}'); $h->b('div', 0, 1, '', '{"class":"vertical"}'); $h->b('article', 0, 1, '', '{"id":"article"}'); $string->breakByGroupSize(1, $content, __DIR__, 'paragraphs'); $h->b('article', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 0, 1, '', '{"class":"row"}'); $h->b('div', 0, 1, '', '{"class":"col col-xs-12"}'); $string->breakByGroupSize(1, $content, __DIR__, 'audio'); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('div', 1, 1); $h->b('section', 1, 1);