- Posts: 9
COMMUNITY FORUM
[SOLVED] K2 EXTRAFIELD LINK TYPE
- wols
-
Topic Author
- Offline
- New Member
Less
More
9 years 8 months ago #147065
by wols
K2 EXTRAFIELD LINK TYPE was created by wols
Hello,
How i can add rel="nofollow" to k2 extrafield link type?
Please help
Best regards!
How i can add rel="nofollow" to k2 extrafield link type?
Please help
Best regards!
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
9 years 8 months ago #147072
by Mohamed Abdelaziz
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Replied by Mohamed Abdelaziz on topic K2 EXTRAFIELD LINK TYPE
Hello,
Do you want to add this to a specific field or for all link type fields?
Do you want to add this to a specific field or for all link type fields?
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- wols
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 9
9 years 7 months ago #147080
by wols
Replied by wols on topic K2 EXTRAFIELD LINK TYPE
Hello,
i want to add it for all extrafield link type.
Thanks
i want to add it for all extrafield link type.
Thanks
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
9 years 7 months ago #147083
by Mohamed Abdelaziz
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Replied by Mohamed Abdelaziz on topic K2 EXTRAFIELD LINK TYPE
In the file components/com_k2/models/item.php, find this line:
Replace it with this modified line:
Take care to backup this change to reapply any K2 update, because this is a core hack.
$value = '<a href="'.$object->value[1].'" '.$attributes.'>'.$object->value[0].'</a>';
Replace it with this modified line:
$value = '<a rel="nofollow" href="'.$object->value[1].'" '.$attributes.'>'.$object->value[0].'</a>';
Take care to backup this change to reapply any K2 update, because this is a core hack.
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- wols
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 9
9 years 7 months ago #147085
by wols
Replied by wols on topic K2 EXTRAFIELD LINK TYPE
thanks you very much.
I see something strange in the generated link,
<span class="itemExtraFieldsValue"><a href="<a rel="nofollow" href="www.site.com" target="_blank">Siteweb" target="_blank">www.site.com" rel="nofollow">text
Maybe you have an idea? the link is duplication and in the href
I see something strange in the generated link,
<span class="itemExtraFieldsValue"><a href="<a rel="nofollow" href="www.site.com" target="_blank">Siteweb" target="_blank">www.site.com" rel="nofollow">text
Maybe you have an idea? the link is duplication and in the href
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
9 years 7 months ago #147088
by Mohamed Abdelaziz
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Replied by Mohamed Abdelaziz on topic K2 EXTRAFIELD LINK TYPE
Make sure that you have closed the " properly.
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.