Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a new component
#1
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,
Reply
#2
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!
Reply




Users browsing this thread: 1 Guest(s)