Keyword

how to add css class to a extrafield?

  • Klaus Fuchs
  • Klaus Fuchs's Avatar Topic Author
  • Offline
  • New Member
More
7 years 4 months ago #162794 by Klaus Fuchs
how to add css class to a extrafield? was created by Klaus Fuchs
Hi, I am rather new with k2, but I managed to display extra fields.
Now I need to add a different class to every field.
What do I want to do:
I have three extrafields, all of them are links:
- facebook
- instagram
- website
I want to add a icon to this links in CSS
And I do want only the icon is clickable.

ther complete template should be like this:
field_image1 - field_image2 - field Image3
Introtext
fulltext
FB Icon(link) - Instagram Icon(link) - WWW Icon link

Since a have only a very little knowledge in php
I dont know where to put this code:
<div class="myfb"><?php echo $this->item->extraFields->goto_fb->label;?></div>
<div class="myinsta"><?php echo$this->item->extraFields->goto_insta->label;?></div>
<div class="mywww"><?php echo$this->item->extraFields->goto_www->label; ?></span></div>
<div class="clr"></div>

in the item.php
somewher can give me a hand? Thanks a lot
Klaus

You will never hear these phrases from us:
We can't do that | I don't know what that is | I did everything on my own | That's too early | That's too late | It's too bad we couldn't work together | Let's catch up sometime | I'm sorry, I'm too busy | That was all my idea | If our competitors don't hav

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 4 months ago #162806 by Krikor Boghossian
Replied by Krikor Boghossian on topic how to add css class to a extrafield?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum