GetSimple Support Forum

Full Version: Adding a new component
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using GetSimple 3.0.

In "theme"-> "edit components" there is the possibility to add a new component. When i click "add component" a new box appears at the bottom of the page in which i can insert title and text.

I'm using the default installation of GetSimple without plugins and i want another "sidebar" component below the original one. How can i add this new component in the page ?

I have no experience in php

Thanks,
gioacchinomauri Wrote:I'm using the default installation of GetSimple without plugins and i want another "sidebar" component below the original one. How can i add this new component in the page ?
If you open up the file "sidebar.php" in GS' default theme "Innovation", you'll find the following code at line 38:

Code:
<div class="section">
    <?php get_component('sidebar');  ?>
div>

The code which actually includes the component named "sidebar" is

Code:
<?php get_component('sidebar');  ?>

So, if you named your component "sidebar2", just copy and paste the line where you want it to appear in the markup and replace "sidebar" with "sidebar2". Place HTML markup around your component as you need.

Besides, right above the entry field in the backend where you input your component contents, you can find the exact line of code you'll need for inclusion in the template. GS automagically creates that line with your chosen component name.

Hope that helps!