Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supply a few more components with a theme
#1
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
Reply
#2
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(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.
Reply
#4
alrighty! Thanks for the input Shawn and datiswous! Nicely done Datiswous! Thanks for the advice
Reply
#5
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
Gratzi!
Reply
#7
(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.
English isn't my native language. Sorry for any mistakes you may find.
Reply




Users browsing this thread: 1 Guest(s)