-
AuthorPosts
-
mikel2004 Friend
mikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 19, 2014 at 8:54 pm #195951Hi!
I wish to add Facebook icon in secnav position.
I know that I must edit /tpls/blocks/mainnav.php file. But waht can I do to add a Facebook icon?
There are a nav-facebook class?Thanks!
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
March 20, 2014 at 8:52 am #527445@ mikel2004,
You need to follow steps mentioned in this thread. But, in the /templates/your_template_name/tpls/blocks/mainnav.php file, you edit as follows:
<!-- INFO -->
<?php if ($this->countModules('secnav-5')) : ?>
<li class="dropdown nav-facebook">
<a data-toggle="dropdown" href="/info-2" class="dropdown-toggle">
<i class="icon-facebook"></i>
</a>
<div class="nav-child dropdown-menu">
<div class="dropdown-menu-inner">
<jdoc:include type="modules" name="<?php $this->_p('secnav-5') ?>" style="T3Xhtml" />
</div>
</div>
</li>
<?php endif ?>
<!-- //INFO -->* nav-facebook : you need to use this class suffix for which you customise css
* icon-facebook : this is icon Facebook you wishAfter that, assign any module facebook to the position “secnav-5”.
Hope this helps.
mikel2004 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 20, 2014 at 6:57 pm #527518Great!
Right now, How can I change the colour black to the facebook icon to blue #3b5998 (more representative).
I have change the code in secnav-2 position, like this:
<!– FACEBOOK –>
<?php if($this->countModules(‘secnav-2’)): ?>
<li class=”dropdown nav-facebook”>
<a data-toggle=”dropdown” href=”https://www.facebook.com/czoom” class=” dropdown-toggle”>
<i class=”icon-facebook”></i>
</a>
</li>
<?php endif ?>
<!– //FACEBOOK –>Thanks
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
mikel2004 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
March 21, 2014 at 5:22 pm #527665Hi Nazario
Your rule affects too the first icon in secnav-1 position with nav-user li class… So, what can I do to change the color ONLY to nav-facebook in secnav-2 position?
Thanks for your help.
<em>@Nazario A 417490 wrote:</em><blockquote>@ mikel2004,
Please open the file: /templates/your_template_name/css/custom.css, then add this rule:
.navbar .secnav .nav > li > a, .secnav .nav > li > a{
background: #3B5998
}
</blockquote>Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
March 24, 2014 at 3:41 am #527774You can use the class suffix to customise as you wish,
In this case, pls open the /templates/your_template_name/css/custom.css file, then find and replace this code:
.navbar .secnav .nav > li > a, .secnav .nav > li > a{
background: #3B5998
}With:
.nav-facebook .dropdown-toggle {
background: #3B5998
}Hope this helps.
1 user says Thank You to Nazario A for this useful post
-
AuthorPosts
This topic contains 7 replies, has 2 voices, and was last updated by mikel2004 10 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum