Hello brothers and greetings from Serbia I just started using InstantCMS and so far I like it very much because you have full control over content and there is soo much options which is great, just love it
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
InstantCMS 2.X
#1
12 декабря 2019 в 20:47
#2
12 декабря 2019 в 20:57
#3
12 декабря 2019 в 21:26
Thanks for your help AndroS , I know about that option but need to add title to link button automatically
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
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
Сегодня в 18:15
#4
12 декабря 2019 в 21:52
Постоји могућност додавања css класе. Можете додати слику са позадинским дугметом за ову ставку менија.I am sure that I need to edit some file and add code to it but not sure which one.
#5
12 декабря 2019 в 22:25
Hvala Ris , pronašao sam rešenje
Well I found solution, under system/fields/url.php line 79:
Just edit like this:
Thanks much for your help guys
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>';
#6
14 декабря 2019 в 23:40
One more question
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
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
#7
15 декабря 2019 в 09:37
#8
15 декабря 2019 в 13:31
#9
16 декабря 2019 в 01:56
Ok, I found solution for this. I know how to add fields
If you want to put your field where you want then you can do it like this:
In my case I have field called link and you should use name that you set inside system name
Or you can use it like this without html and set your own design:
Hope this is the right way because its working fine for me
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']; ?>