- Posts: 157
COMMUNITY FORUM
Re: Integrated in-content tabs?
- yaksushi
- Topic Author
- Offline
- Premium Member
Less
More
12 years 9 months ago #60886
by yaksushi
Re: Integrated in-content tabs? was created by yaksushi
Anyone figure out how to use this to tab the comments and add Facebook comments like K2 has in their blog?
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 9 months ago #60887
by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Integrated in-content tabs?
You may use K2Tabber (extensions.joomla.org/extensions/extension-specific/k2-extensions/13661)
Then change your item.php template like this:
<div id="ExtraFields">
<!-- tabs menu -->
<ul class="simpleTabsNavigation">
<li id="comments"><a href="javascript: void();">Comments</a></li>
<li id="facebook"><a href="javascript: void();">Facebook</a></li>
</ul>
<!-- tabs content -->
<div class="simpleTabsContent">
Comments code goes here (1st Tab content).
</div>
<div class="simpleTabsContent">
Facebook comments code goes here (2nd Tab content).
</div>
</div>
You can show on tabs ANYTHING you like (article, video, galleries etc.) just maintain this structure.
Then change your item.php template like this:
<div id="ExtraFields">
<!-- tabs menu -->
<ul class="simpleTabsNavigation">
<li id="comments"><a href="javascript: void();">Comments</a></li>
<li id="facebook"><a href="javascript: void();">Facebook</a></li>
</ul>
<!-- tabs content -->
<div class="simpleTabsContent">
Comments code goes here (1st Tab content).
</div>
<div class="simpleTabsContent">
Facebook comments code goes here (2nd Tab content).
</div>
</div>
You can show on tabs ANYTHING you like (article, video, galleries etc.) just maintain this structure.
Please Log in or Create an account to join the conversation.
- yaksushi
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 157
12 years 9 months ago #60888
by yaksushi
Replied by yaksushi on topic Re: Integrated in-content tabs?
cool thanks for the tip I'll give this a try and post my results.
Please Log in or Create an account to join the conversation.
- yaksushi
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 157
12 years 8 months ago #60889
by yaksushi
Replied by yaksushi on topic Re: Integrated in-content tabs?
Thanks for the help got it working... Only issue is I can't style it because I can't assign a <div> to each <li>.... Any advice?
<!-- tabs menu -->
<ul class="simpleTabsNavigation">
<li id="comments"><a href="javascript: void();">Comments</a></li>
<li id="facebook"><a href="javascript: void();">Facebook</a></li>
</ul>
<!-- tabs menu -->
<ul class="simpleTabsNavigation">
<li id="comments"><a href="javascript: void();">Comments</a></li>
<li id="facebook"><a href="javascript: void();">Facebook</a></li>
</ul>
Please Log in or Create an account to join the conversation.
- Matt
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 8 months ago #60890
by Matt
Replied by Matt on topic Re: Integrated in-content tabs?
You can style each li with
li.comments {
margin: _ _ _
padding: _ _ _
etc.
}
li.facebook {
margin: _ _ _
padding: _ _ _
etc.
}
li.twitter {
margin: _ _ _
padding: _ _ _
etc.
}
li.comments {
margin: _ _ _
padding: _ _ _
etc.
}
li.facebook {
margin: _ _ _
padding: _ _ _
etc.
}
li.twitter {
margin: _ _ _
padding: _ _ _
etc.
}
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 8 months ago #60891
by Jakub Jedynak
li#comments & li#facebook (ID = #, class = .)
And you can also style 'a' inside 'li' if you need, eg.: li#facebook a { }.
If you need to style DIV with content add extra styles to div:
<div class="simpleTabsContent divComments"> ... </div>
<div class="simpleTabsContent divFacebook"> ... </div>
Replied by Jakub Jedynak on topic Re: Integrated in-content tabs?
Matt wrote: You can style each li with
li.comments {
margin: _ _ _
padding: _ _ _
etc.
}
li.facebook {
margin: _ _ _
padding: _ _ _
etc.
}
li.twitter {
margin: _ _ _
padding: _ _ _
etc.
}
li#comments & li#facebook (ID = #, class = .)
And you can also style 'a' inside 'li' if you need, eg.: li#facebook a { }.
If you need to style DIV with content add extra styles to div:
<div class="simpleTabsContent divComments"> ... </div>
<div class="simpleTabsContent divFacebook"> ... </div>
Please Log in or Create an account to join the conversation.
- yaksushi
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 157
12 years 8 months ago - 12 years 8 months ago #60892
by yaksushi
Replied by yaksushi on topic Re: Integrated in-content tabs?
Well I though I had it working. Turns out that I get the same comment duplicated on every k2 article. All I did to implement this was add this code into my item.php
myurl.com/"article id #" which doesn't really exist. Anyone know how I can append the correct non SEF url after my domain?
Please Log in or Create an account to join the conversation.