GetSimple Support Forum

Full Version: Supply a few more components with a theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all!

I'm developing a theme and I would like to add maybe 1 or 2 more components then the one's supplied(initially when you install gs). So someone would have some things in place when they activate the theme.

Is this possible? If so can I?

a. add it within my functions.php
b. Can I hook into a component function - if so how?

I've scoured the admin folder looking for where the components are created but I couldn't find them. Most obvious is the component.php.

I kind of get whats going on there but I dont see where it actually outputs the html.

Just thinking out loud here...another option would be to just code it in the the functions.php and pull it in the template


Thanks!!!

Lance
Components are stored in component.xml there is no native way to add components at this time other than doing it manually with your own code or using some core functions.
(2013-10-05, 06:36:30)lnickel Wrote: [ -> ]Hi all!

I'm developing a theme and I would like to add maybe 1 or 2 more components then the one's supplied(initially when you install gs). So someone would have some things in place when they activate the theme.

Is this possible? If so can I?

a. add it within my functions.php
b. Can I hook into a component function - if so how?

I've scoured the admin folder looking for where the components are created but I couldn't find them. Most obvious is the component.php.

I kind of get whats going on there but I dont see where it actually outputs the html.

Just thinking out loud here...another option would be to just code it in the the functions.php and pull it in the template


Thanks!!!

Lance

I don't think that exist. There are plans for it to support this function in future releases.

You can just ad the component code in the theme and then make a description where you refer to the component names used. People only have to make those components with the name, which is very easy. See my added Startling theme where I did that.
alrighty! Thanks for the input Shawn and datiswous! Nicely done Datiswous! Thanks for the advice
Yeah i would just call the component, it wont error out or anything if it does not exist.

use a prefix tho like themename_sidebar or something.
And advise user to create it.
Gratzi!
(2013-10-05, 07:02:40)shawn_a Wrote: [ -> ]Yeah i would just call the component, it wont error out or anything if it does not exist.

Thanks shawn, I was using an IF function to validate whether the component exists or not.