Add link
I have a task to add a link to the information block, but so that it does not look like an URL, but simply blue text, or maybe even a button, and open in a new tab. If such a possibility without kernel coding? A link is a custom field.
-
- · Ivan Mishchenko
- ·
Это можно сделать прямо в редакторе, публикации, статусы и все остальное, просто нажмите на добавить ссылку, откроется поле добавьте ссылку, а ниже напишите текст который вам нужен.
-
- · Yra
- ·
Спасибо, но это немого не то. Мне нужна ссылка - пользовательское поле, чтобы пользователь ее обновлял.
-
Не совсем понимаю, но можно поискать, что-то подходящее в настройках страниц: СТУДИЯ -> СТРАНИЦЫ-> ДОБАВИТЬ БЛОК-> СКЕЛЕТЫ здесь можно добавить любой тип блока: текст, RSS, ссылку и.т.д
-
-
·
LeonidS
- ·
Hello Yra !
You may add a new field with "text" type and setup "Check for" value as "Regular expression". Then in the appeared field "Expression" setup the filter to URLs only. Then this field should be enabled in the "View Person" area (Studio->Forms->Persons tab). In this case, you will have the possibility to correct this field via editing of the template's styles and files.
-
·
LeonidS
-
- · Keith Fawcett
- ·
LeonidS Could you provide screenshots of where this "Check for" is located? I do not see it in the Form > Fields page.
-
- · Yra
-
·
In reply to LeonidS
- ·
Hello, LeonidS!
I tried to look for exactly where I can edit this place in the template files, but without success. I recently started to get acquainted with your platform and it certainly pleases me, I think sooner or later you will add the URL field as an option.
-
Hello Keith Fawcett !
You should set this field as "Mandatory" then the necessary fields will appear below "Unique" option.
-
-
·
LeonidS
-
·
In reply to Yra
- ·
Yes, it will require Javascript and CSS scripts. You may add own code which transforms this new field, to the RAW block. It will look like:
<script type="text/javascript">
$(function() {
/* code for finding your URL field name and trasnformation of the found result */
});
</script> -
·
LeonidS
-
- · Keith Fawcett
- ·
Hi LeonidS, two comments.
- I do not want the field to be mandatory, but still want to be able to define the field as a link, so it will be hyperlinked on the website.
- Even after selecting mandatory to expose the fields, they appear to be disabled, so you are unable to select any values in the dropdown or type text in the error message field.
-
-
·
LeonidS
- ·
Hello Keith Fawcett !
You may leave the check of the URL field as empty (but in this case the users will have the possibility to write there not-only URL text).
-
·
LeonidS
-
- · Keith Fawcett
- ·
LeonidS I'm confused. I do not see "Check for" value as "Regular expression". Does this require editing the php file or can it be accomplished through configuration?
Could you provide screenshots describing how to make this modification?
-
- · Yra
-
·
In reply to Keith Fawcett
- ·
Hello!
After you turn on the "necessary", you should see a drop-down list of "check for", there you will find what you need.
It would not be bad to have ready-made code for inserting an URL, I myself cannot write it.
-
- · Keith Fawcett
- ·
Yra what necessary? This is all I see on the Text field type.
-
- · Yra
-
·
In reply to Keith Fawcett
- ·
I see that you turned on the wrong checkbox to see it.
Tell me how you quote the name of the link in the message?
-
- · Keith Fawcett
-
·
In reply to Yra
- ·
Yra could you post an image of the checkbox you are talking about?
-
- · Yra
- ·
I tried to place the image and the link, but the system does not allow me to do this because of my standard membership (admins: the error notification on the image is not correct). How do you not see that one checkbox glows green and which is needed is turned off and red?
-
- · Keith Fawcett
- ·
Yra my apologies, it says "Mandatory" on my menu, not "Necessary".
As I mentioned in one of my posts above. It doesn't make sense to make this mandatory. I only want to enforce/validate the type of data entered, if someone enters a value.
Here's a video showing the field not working. I do not have a "Regular Expression" value.
-
- · Yra
- ·
Sorry, probably some difficulties with the translation, I use Google Translate😐 Try to save the field first and then check for a regular expression.
-
- · Keith Fawcett
- ·
I figured out my issue with the disabled fields. I had to click save after selecting "Mandatory", then reopen the field. That allowed me to select the option for regex.