Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Question regarding adding columns of multiple of 1/5 to the grid system

Open thednp opened this issue 10 years ago • 2 comments

We have the builder's config.php grid setup but the documentation doesn't say anything about adding more column types to the grid, I was thinking about 2/5, 3/5, and 4/5 columns.

Questions:

  • If we override the config.php and add additional columns, how do we add the corresponding IMAGES to these new columns and where do we include them?
  • With the additional columns, will the editor work properly when we'll change the width of a column to include the new column types?

UPDATE:

  • The Javascript properly works toggling through all the new column classes/
  • The images are not properly added, as simply configured as the original columns, see below: new_columns

FINAL UPDATE:

  • The thumbnails have to go to framework-customizations/extensions/shortcodes/shortcodes/column/thumbnails/ folder and your new columns go fine. Here are all the thumbnails you need, already optimized:

1_3 1_4 1_2 2_3 3_4 1_1 1_5 1_6 2_5 3_5 4_5

FYI: I will leave this open for others to learn and discuss.

thednp avatar Jul 03 '16 13:07 thednp

Wow, my two problems solution is here. Thanks.

ghost avatar Jul 22 '16 17:07 ghost

Thanks for your work here @thednp saved me a lot of frustration :)

A few notes here:

  1. "framework-customizations/extensions/shortcodes/column/thumbnails/" should be "framework-customizations/extensions/shortcodes/shortcodes/column/thumbnails/" for the image paths.
  2. 'fw' needs to be a dependency in the backend grid css include - wp_enqueue_style( 'thshpr-backend-grid', get_template_directory_uri() .'/framework-customizations/extensions/builder/static/css/backend-grid.css', array('fw'), fw()->theme->manifest->get_version() );
  3. the frontend grid css completely replaces the one in the unyson plugin builder directory

Probably these are all obvious, but maybe will help someone out who runs across this.

Hopefully these columns will be included in the plugin though (5 columns of 1/5 aren't too useful imo, it really needs the 2/5, 3/5 and 4/5).

Cheers

robioat avatar Nov 14 '16 23:11 robioat