The Invisible Framework – YOOtheme Pro gets native
In our last post we gave you an overview of what to expect from the Warp 7 successor. With our upcoming series of blog posts we want to go more into depth and explain the new main features in detail. Today, we're going to look into the new, more native concept behind our framework.
What does Native mean?
One of our main goals during development was to simplify things. To make everything easier to use, we have made the framework structure more "native". This means that the framework moves into the background, with a more typical theme structure in the foreground. A theme should feel like any other theme in Joomla and WordPress, with nothing between you and the CMS.
Why is this better than before?
It's now easier for developers to customize theme files. Thanks to the adapted structure, those who are already acquainted with Joomla or WordPress will feel right at home. There is no need to "learn" the framework for someone coming from Joomla or WordPress.
Native file structure
The modularized file structure is now closer to what developers are used to from Joomla and WordPress. This means that the Joomla version of a theme is structured a bit differently than the WordPress version, as you can see in the following example.
In the existing Warp 7, you find the entire site's layout in the theme.php file, which has been different from what the CMS usually expects.
In the new framework the layout is divided into several template files. This makes the core structure organized more clearly and mimics the original structures from Joomla and WordPress.
In WordPress the file structure now looks like this:
templates/content.php content-page.php content-search.php menu.php ... index.php 404.php archive.php header.php footer.php ...
For Joomla, you will now find a file structure like this:
html/ ... component.php error.php config.php index.php
Native system calls
The new native approach also applies to system API calls. So far, Warp has used its own method to render modules. To someone new to the framework this can already be a barrier. Even though it is easy to understand when you think about it, it is definitely unfamiliar.
<?php if ($this['widgets']->count('toolbar-l')) : ?> <div> <?php echo $this['widgets']->render('toolbar'); ?> </div> <?php endif; ?>
Our new framework uses the same calls as Joomla and WordPress.
Here is the example for Joomla:
<?php if ($this->countModules('toolbar-left')) : ?> <div> <jdoc:include type="modules" name="toolbar" style="cell" /> </div> <?php endif ?>
A powerful new framework with a native approach
The native approach that we have chosen promises a rapid learning process to users who have experience in working with Joomla or WordPress. The powerful features that you are used to – and many more that we will be talking about – are always at your disposal, while being beautifully integrated in the CMS.
In our next post we will be entering into the topic of child themes and how they solved the dilemma that was keeping us from implementing 1-click updates.