Jump to content
Sign in to follow this  
zrbarnes

Recommended way to add Feature Design Style options?

Recommended Posts

zrbarnes

If I want to add options to the drop-down menu in the Feature Setup Options -> Feature Design Style, what is the recommended way to accomplish this? 28s6d6v.png I found the relating code in sectionsfeaturessection.php: 'feature-design' => array(

'type'=> 'select',

'shortexp' => 'Select the design style you would like this feature to have (e.g. default background color, text color, overlay? etc...).',

'title' => 'Feature Design Style',

'selectvalues' => array(

'fstyle-darkbg-overlay' => array( 'name' => 'White Text - Dark Feature Background - Transparent Text Overlay (Default)'),

'fstyle-lightbg'=> array( 'name' => 'Black Text - Light Feature Background with Border - No Overlay'),

'fstyle-darkbg'=> array( 'name' => 'White Text - Dark Feature Background - No Overlay'),

'fstyle-nobg'=> array( 'name' => 'Black Text - No Feature Background - No Overlay'),

I can add the options there, and then add css rules for the new options to my custom css file. Is this the recommended method, or is there a "better" way? Thanks!

Share this post


Link to post
Share on other sites
Rob
Use the information provided in the wiki rather than altering code as this could result in an over-write in future. http://www.pagelines.com/wiki/

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
zrbarnes
Believe it or not, I started in the wiki, but I'm not sure the nomenclature used to described what I'm trying to do. Any hints on where I should look? Maybe a search keyword? Thanks! EDIT: Just stumbled upon the Pagelines Customize plugin. I'm guessing I alter pagelines-customize/functions.php, and add a filter that merges my new options in an array to the existing array. Is this the preferred way?

Share this post


Link to post
Share on other sites
Simon
A better way, install the base child theme, and copy the entire feature folder into the base theme sections folder. Then refresh the store, and look under sections/child, features shows up here. You can edit this new feature folder as much as you like, it overrides the primary features. This was the intended way to develop features.

Share this post


Link to post
Share on other sites
zrbarnes
I've been working with the base theme all along, so that's good. I copied over the folder, made changes, and it shows up, so everything is configured correctly. That brings me to two questions: 1. What is the Pagelines Customize plugin for then? 2. When an update is released that involves a change to the code in the features folder, wouldn't the folder I just copied over contain the old code? Wouldn't I need to go in, find all my changes and copy them into the new versions of the files? I'm sure these are elementary questions, so I apologize for that. I am still trying to wrap my head around some aspects of the platform.

Share this post


Link to post
Share on other sites
Simon
There are 2 ways to customize and keep your files intact when you apply a core update. [b]1. Child theme.[/b] The usual route that everybody is used to, only problem here is you cant then install a 3rd party child theme through the store and update it as you will lose your edits. [b]2. Customize Plugin.[/b] This essentially emulates a child theme, it has the same style.css and functions.php and gets inserted in the right places automatically. With this you can update the core files and a 3rd party child theme and still keep your edits. The sections folder at this time isnt scanned in this folder though, might change that later if required.

Share this post


Link to post
Share on other sites
zrbarnes
That was pretty close to what I was thinking was happening. My brain might be good for something after all... Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×