add a button between main menu and JomSocial menu

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
Thu Sep 19, 2013 12:13 am
Reply with quote
Report this post
Hi, i am would like to add a button as shown in the attachment, between the main menu and the jomsocial menu.. Any instructions how to achieve that?
User avatar
Junior Boarder

GK User
Thu Sep 19, 2013 5:40 am
Reply with quote
Report this post
Please post your website link so we can see its html markup.

Alternatively you can add your button in
File: templates/gk_simplicity/layouts/default.php
Line:79 before following code.
Code: Select all
<?php if($this->API->modules('header')) : ?>


Code: Select all
        <div id="myNewButtonWrapper">
         <button class="mybuttonclass">
            <a href="link to button action">My Button Text Here</a>
         </button>
      </div> 

use following css to position or style your button.
Code: Select all
#myNewButtonWrapper
.mybuttonclass

See you around...
User avatar
Platinum Boarder

GK User
Thu Sep 19, 2013 12:23 pm
Reply with quote
Report this post
Hi Normanuk,

Thank you for your response.
Allow me to explain a bit more my requirements for that button..
I need to set access to that button i.e only specific members to be able to see it, and that button will direct to a page.
Now, what i tried to set the suffix "page title" module and i inserted the code you gave me. The result wasn't a box and it was right at the top and inside a "block"(probably not the best description, but i hope you get the idea)
How can i create the exact box as show in my attachment with a module??
User avatar
Junior Boarder

GK User
Thu Sep 19, 2013 12:50 pm
Reply with quote
Report this post
Well you need to style it so it looks like a box and it would be right at the top as after the main menu that section is the first block before any main content.
You can use below code to add that position as your module position. Rename Newmodposition twice.
Code: Select all
         <?php if($this->API->modules('Newmodposition')) : ?>
         <div id="gKNewmodposition">
            <jdoc:include type="modules" name="Newmodposition" style="<?php echo $this->module_styles['none']; ?>" />
         </div>
         <?php endif; ?> 

Now create new custom html module and add below content and manually type in module position Newmodposition or if you have renamed the position enter that module position. In module access choose your user group such as registered or your custom user group.
Code: Select all
<a id="mynewbutton" class="button" href="your link goes here">Members Only</a>


Now link should get its css from button class but you can further customize the look or position by using following css.
Example
Code: Select all
#mynewbutton { float: right; color: #ffffff, background: #000000 }


If you post your site it would be easier.

See you around...
User avatar
Platinum Boarder

GK User
Fri Sep 20, 2013 1:33 pm
Reply with quote
Report this post
Thank you! It worked..
If i want to have exactly the same button but with different access level, do i have to rename it? or leave it as is and change the link that directs?
I placed the button on the right side but i would like to slightly move it towards the center, i added
margin-right: 25px;
but it doesnt seem to work, any suggestions?
I am on local server..
User avatar
Junior Boarder

GK User
Sun Sep 29, 2013 9:58 am
Reply with quote
Report this post
Just create another module with different button / link and assign it to a different usergroup.

I would need to see it on your site to give you a css fix for centering your button.
User avatar
Platinum Boarder


cron