Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Contact Slide close button
New Landing › How can we help? › Cardinal › Contact Slide close button
- This topic has 3 replies, 2 voices, and was last updated 9 years by
Rui Guerreiro – SUPPORT.
-
Posted in: Cardinal
-
March 20, 2015 at 10:22 am #159328
Hi Guys,
Is it possible to add a close button in the Contact Slide out function?
I’ve already added an extra icon using a child theme functin custom code below.
Best would be to change the two icons to a ‘X’ when the page is open.Can you please help.. After this I can launch the site.
—function sf_header_aux($aux) {
global $sf_options;
$show_cart = $sf_options[‘show_cart’];
$show_wishlist = $sf_options[‘show_wishlist’];
$header_left_config = $sf_options[‘header_left_config’];
$header_right_config = $sf_options[‘header_right_config’];
$header_left_text = __($sf_options[‘header_left_text’], ‘swiftframework’);
$header_right_text = __($sf_options[‘header_right_text’], ‘swiftframework’);
$fullwidth_header = $sf_options[‘fullwidth_header’];
$contact_icon = apply_filters( ‘sf_header_contact_icon’, ‘<i class=”ss-mail”></i> <i class=”ss-phone”></i>’ );if ($aux == “left”) {
$header_left_output = “”;
if ($header_left_config == “social”) {
$header_left_output .= do_shortcode(‘[social]’). “\n”;
} else if ($header_left_config == “aux-links”) {
$header_left_output .= sf_aux_links(‘header-menu’, TRUE, “header-1”). “\n”;
} else if ($header_left_config == “overlay-menu”) {
$header_left_output .= ‘<span>’.__(“Menu”, “swiftframework”).'</span>‘. “\n”;
} else if ($header_left_config == “contact”) {
$header_left_output .= ‘‘.$contact_icon.’‘. “\n”;
} else if ($header_left_config == “search”) {
$header_left_output .= ‘<nav class=”std-menu”>’. “\n”;
$header_left_output .= ‘<ul class=”menu”>’. “\n”;
$header_left_output .= sf_get_search(‘aux’);
$header_left_output .= ‘‘. “\n”;
$header_left_output .= ‘</nav>’. “\n”;
} else {
$header_left_output .= ‘<div class=”text”>’.do_shortcode($header_left_text).'</div>’. “\n”;
}
return $header_left_output;
} else if ($aux == “right”) {
$header_right_output = “”;
if ($header_right_config == “social”) {
$header_right_output .= do_shortcode(‘[social]’). “\n”;
} else if ($header_right_config == “aux-links”) {
$header_right_output .= sf_aux_links(‘header-menu’, TRUE, “header-1”). “\n”;
} else if ($header_right_config == “overlay-menu”) {
$header_right_output .= ‘<span>’.__(“Menu”, “swiftframework”).'</span>‘. “\n”;
} else if ($header_right_config == “contact”) {
$header_right_output .= ‘‘.$contact_icon.’‘. “\n”;
} else if ($header_right_config == “search”) {
$header_right_output .= ‘<nav class=”std-menu”>’. “\n”;
$header_right_output .= ‘<ul class=”menu”>’. “\n”;
$header_right_output .= sf_get_search(‘aux’);
$header_right_output .= ‘‘. “\n”;
$header_right_output .= ‘‘. “\n”;
$header_right_output .= ‘</nav>’. “\n”;
} else {
$header_right_output .= ‘<div class=”text”>’.do_shortcode($header_right_text).'</div>’. “\n”;
}
return $header_right_output;
}
}Attachments:
You must be logged in to view attached files.March 20, 2015 at 4:47 pm #159449Hi,
The same button that opens the contact slideout it’s the same one that closes.
-Rui
March 25, 2015 at 10:40 am #160559I know, but is it possible to change this? This isn’t clear for some users.
March 25, 2015 at 12:37 pm #160617Let’s pretend you closing icon it’s the ss-cloud icon
change this line
$contact_icon = apply_filters( 'sf_header_contact_icon', '<i class="ss-mail"></i> <i class="ss-phone"></i>' );
to this one
$contact_icon = apply_filters( 'sf_header_contact_icon', '<i class="ss-mail"></i> <i class="ss-phone"></i><i class="ss-cloud my-custom-close-bt"></i>' );
In the css custom option add this
.my-custom-close-bt{ display:none; } .slide-open .my-custom-close-bt{ display:block; }
-Rui
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.