Phone call button

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Jun 10, 2016 12:29 pm
Reply with quote
Report this post
Hi,

I need some support to display a "stupid feature" in the menu position.
On the demo, there is a button "Blog" a the right of the main menu. I would like to replace this menu item by a phone call button and this button must be available also on mobiles and tablets (not hidden like the main menu).

Thanks in advance for your reply :)
User avatar
Fresh Boarder

GK User
Sun Jun 12, 2016 9:06 am
Reply with quote
Report this post
UP :?:
User avatar
Fresh Boarder

teitbite
Wed Jun 15, 2016 1:35 pm
Reply with quote
Report this post
Hi

"blog" button is a part of menu, so best way would be to remove an extra class from this menu item option to not show it separated and than edit file /layout/default.php and add phone number right over the line:

Code: Select all
             <?php $this->layout->loadBlock('logo_small'); ?>


make Your code looks like:

Code: Select all
<div class="phone_number">123456789</div>


and tell me the url to Your site when You'll do this so I'll tell You what else is needed.
User avatar
Moderator

GK User
Wed Jun 15, 2016 2:55 pm
Reply with quote
Report this post
Ok, thank you for this first reply.

I've added this code in the file /layout/default.php like this:
Code: Select all
 
<div id="gkMainMenu" class="gkPage">
  <?php if($this->layout->isFrontpage()) {
      $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
      $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
     } else {
      $this->mainmenu->loadMenu($this->API->get('menu_name_subpages','mainmenu'));
      $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
    }
   ?>
<div class="button" style="margin-top:10px; float:right"><a style="color:#fff!important;" href="tel:+336000000000">06 00 00 00 00</a></div>
 </div>


It's works fine on desktop but I need to display it also on mobile (where it's much more relevant).
User avatar
Fresh Boarder

teitbite
Sat Jun 18, 2016 5:07 pm
Reply with quote
Report this post
Hi

To help with mobile I will need to see Your site first. It will requires some extra codding to force it to be shown in one place.
User avatar
Moderator


cron