I created content type and added Link field type and my question is how to show button inside content instead of the whole link, example:
(Dont want this) Link:
(I want to show it as button with my own title, like this) Link: Go to this link
Hope someone understand me, I can read Russian but dont understand every word so documentation is not much useful for me
I did try to find solution inside your docs but without any luck. I understand HTML and CSS, but dont know which file to edit so I can accomplish this
See I marked that field validation as Required and as URL so when I click Save then I am getting error because its not valid url (Example: google.com|Google).
I am sure that I need to edit some file and add code to it but not sure which one.
Would be nice to add input field where we could add custom title for our link. For example:
Link CSS class: button
Custom link title: Go to this page or whatever we want to enter
Постоји могућност додавања css класе. Можете додати слику са позадинским дугметом за ову ставку менија.I am sure that I need to edit some file and add code to it but not sure which one.
Well I found solution, under system/fields/url.php line 79:
return '<a rel="noopener'.$nofollow.'" target="_blank" '.$class.' href="'.htmlspecialchars($href).'">'.htmlspecialchars($value).'</a>';
return '<a rel="noopener'.$nofollow.'" target="_blank" '.$class.' href="'.htmlspecialchars($href).'">'.htmlspecialchars("Go to this link or whatever you want to put in here").'</a>';
How to manually add content type custom field?
I see they are auto loaded (default_item.tpl.php) but because of the design I want and I need to add them manually
If you want to put your field where you want then you can do it like this:
<?php echo $fields['link']['html']; ?>
Or you can use it like this without html and set your own design:
<?php echo $item['link']; ?>