Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Column backgrounds.
New Landing › How can we help? › Themeforest Theme Support › Dante › Column backgrounds.
- This topic has 4 replies, 2 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Dante
-
April 15, 2014 at 12:08 pm #67243
Hi there,
Within the swift builder I can edit all of the background functionality of a row, but is it possible with a column? I want to have a two full-width columns that span 50% of the screen each with different backgrounds.
I can currently have two columns of standard-width where I can place elements in, or I can have a single row with one background, but not a mix.Is this possible?
Cheers.
April 15, 2014 at 1:14 pm #67288Hi
You can add an extra class for the column, and add the colored background with css
– Kyle
April 16, 2014 at 8:38 am #67549Sorry, that’s not really what I meant. I was talking about getting the Row functionality for columns. It doesn’t matter now, I figured out how to have 50% width Rows and given myself a new option in the Wrap-type dropdown box. So instead of just having ‘Standard width content’ and ‘Full-width content’, I now have ‘50% width content’ too.
The changes I made are below for anyone who wants to have it:
Edit 1.
File : dante/swift-framework/page-builder/builder/shortcodes/row.php
Line : 129 – 135if ($wrap_type == "fifty-width") { $colWidth = 'fiftyPercent'; } else { $colWidth = ''; } $output = $this->startRow($el_position, $colWidth, true) . $output . $this->endRow($el_position, '', true);
Edit 2.
File : dante/swift-framework/page-builder/builder/shortcodes/row.php
Line : 214"value" => array(__('Standard Width Content', "swift-framework-admin") => "content-width", __('Full Width Content', "swift-framework-admin") => "full-width", __('50% Width Content', "swift-framework-admin") => "fifty-width"),
Edit 3.
File : dante/swift-framework/page-builder/builder/lib/shortcodes.php
Line : 132 – 158public function startRow($position, $col_width = "", $fullwidth = false) { global $sf_sidebar_config; if (is_singular('portfolio')) { $sf_sidebar_config = "no-sidebars"; } /* CHANGE - TO INCLUDE A 50% WIDTH ROW CLASS */ if ( $col_width == 'fiftyPercent' ) { $fiftyClass = 'rowFiftyPercent'; } else { $fiftyClass = ''; } $output = ''; if ( strpos($position, 'first') !== false ) { if ($fullwidth) { /* ANDYP CHANGE - TO INCLUDE A 50% WIDTH ROW CLASS */ $output = ( !empty($_GET['spb_debug']) && $_GET['spb_debug']=='true' ? "\n" . '<!-- START row -->' ."\n" : '' ) . '<div class="row fw-row '.$fiftyClass.'">'; } else if ($sf_sidebar_config == "no-sidebars") { $output = ( !empty($_GET['spb_debug']) && $_GET['spb_debug']=='true' ? "\n" . '<!-- START row -->' ."\n" : '' ) . '<div class="container"><div class="row">'; } else { $output = ( !empty($_GET['spb_debug']) && $_GET['spb_debug']=='true' ? "\n" . '<!-- START row -->' ."\n" : '' ) . '<div class="row '.$fiftyClass.'">'; } } return $output; }
April 16, 2014 at 8:41 am #67556Followed by the actual CSS style for the new class:
.rowFiftyPercent { width: 50%; float:left; }
April 16, 2014 at 9:00 am #67560Ok great, nice work!
– Kyle
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.