1. Arena Esport
  2. Support
  3. Wednesday, June 01 2016, 06:12 PM
Hi,

I need users in a specific joomla group to be able to change a link field that will be shown as a button so that they can redirect visitors to a new page for coaching reservation for example.

So i'd like in a precise group of fields such as #jsn_competences on my website, the <a> elements to look like buttons such as the ".btn" class of my template, and the text in the button to be the name of the field like "reservation" and not the link itself.

Regards.
Attachments (1)
References
  1. http://arena-esport.com/index.php/profil/Enzo
Accepted Answer
admin Accepted Answer
Admin
Hi,
you can do something like this:
1. Create 2 fields
- Link field for link URL (hidden on profile page) - for example with alias "reservation_link"
- HTML delimiter (hidden on registration and edit profile pages) - for example with alias "reservation_btn"
2. Put in HTML delimiter put something like this:

<a class="btn btn-default" href="/{user reservation_link displayed raw}">Reservation</a>

3. In the link field add condition to hide HTML delimiter if it is empty, so:
Condition 1
Operator: "Equal"
Field to Compare: "Custom Value"
Custom Value: Leave empty
Target Field: Choose HTML Delimiter
Target Action: Hide

Links
{user reservation_link displayed raw} will be replaced with URL in raw mode.
This sintax become from our Content Plugin, see docs at http://docs.easy-profile.com/index.php/article/content-plugin
Docs about HTML delimiter field type at http://docs.easy-profile.com/index.php/article/html-delimiter-field-type

Tips
- You can use a simple Custom module to show button, you need to enable "Prepare Content" parameter to trigger Contents Plugin, HTML delimiter is useful to show button in Field Position.
- a Good Alternative is to use a simple javascript to add class and change text of link.
  1. more than a month ago
  2. Support
  3. # Permalink
Arena Esport Accepted Answer
Pro
Awesome. It works perfectly, thank you !
  1. more than a month ago
  2. Support
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.