Tag style in an article

GK User
Sun Jun 22, 2014 5:46 pm
Hello,

With Joomla! 3.3.1 Stable [ Ember ] 11-June-2014 and gk_twn2_J!3 template :

Capture_1.JPG

With Joomla! 3.3.1 Stable [ Ember ] 11-June-2014 and Beez3 template :

Capture_2.JPG

Can you give me the css code to place the tags in a button at the top of the article as the template beez3 ?
Thank you
User avatar
Expert Boarder

teitbite
Sun Jun 22, 2014 9:06 pm
Hi

Can You please tell me what type of artices are You using? Is it a regular joomla article or k2 ?
User avatar
Moderator

GK User
Sun Jun 22, 2014 9:12 pm
Hello,

It is a regular joomla article.
User avatar
Expert Boarder

teitbite
Mon Jun 23, 2014 2:35 pm
Hi

Please edit /html/com_content/article/default.php and around line 233 please find this code:

Code: Select all
   <?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
       <div class="tags"><span class="tags-label"><?php echo JText::sprintf('TPL_GK_LANG_TAGGED_UNDER'); ?></span>
          
       <?php foreach ($this->item->tags->itemTags as $tag) : ?>
            <a href="<?php echo JRoute::_(TagsHelperRoute::getTagRoute($tag->tag_id . ':' . $tag->alias)) ?>"><?php echo $tag->title; ?></a>
       <?php endforeach; ?>
       </div>
   <?php endif; ?>


than copy it under line 77 where the code to show a title of the article is.
User avatar
Moderator

GK User
Mon Jun 23, 2014 3:04 pm
Thank you, this is OK: tags are now under title.
Moreover, I hope the tags are in the form of buttons : how ?
User avatar
Expert Boarder

teitbite
Tue Jun 24, 2014 9:04 pm
Hi

Please tell me an url to an example of page with tags.
User avatar
Moderator

GK User
Wed Jun 25, 2014 6:36 am
User avatar
Expert Boarder

teitbite
Thu Jun 26, 2014 9:15 pm
Hi

Please add this code to override.css and make sure override is enabled in joomla panel.

Code: Select all
.item-page .tags a {
background-color: blue;
border-radius: 3px;
color: #ffffff;
margin:3px;
}
User avatar
Moderator

GK User
Fri Jun 27, 2014 6:56 am
teitbite wrote:Hi

Please add this code to override.css and make sure override is enabled in joomla panel.

Code: Select all
.item-page .tags a {
background-color: blue;
border-radius: 3px;
color: #ffffff;
margin:3px;
}

This is perfect, thank you.
User avatar
Expert Boarder

GK User
Fri Jun 27, 2014 2:49 pm
All right, thank you. However, I now wish that tags are less stuck under the article title : how?
User avatar
Expert Boarder

teitbite
Sun Jun 29, 2014 11:00 pm
Hi

Try maybe:

Code: Select all
.item-page .tags {
margin-top: 15px;
}
User avatar
Moderator

GK User
Mon Jun 30, 2014 9:20 am
That's right, thank you.
User avatar
Expert Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.