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.

  • 500
  • More
Replies (19)
    • Это можно сделать прямо в редакторе, публикации, статусы и все остальное, просто нажмите на добавить ссылку, откроется поле добавьте ссылку, а ниже напишите текст который вам нужен.

      • Спасибо, но это немого не то. Мне нужна ссылка - пользовательское поле, чтобы пользователь ее обновлял.

        • Не совсем понимаю, но можно поискать, что-то подходящее в настройках страниц: СТУДИЯ -> СТРАНИЦЫ-> ДОБАВИТЬ БЛОК-> СКЕЛЕТЫ здесь можно добавить любой тип блока: текст, RSS, ссылку и.т.д

          • 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 Could you provide screenshots of where this "Check for" is located? I do not see it in the Form > Fields page. 

              image_transcoder.php?o=bx_froala_image&h=1670&dpx=1&t=1563365096

              • 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.

                  • 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>

                    • Hi LeonidS, two comments.

                      1.  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. 
                      2. 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. image_transcoder.php?o=bx_froala_image&h=1678&dpx=1&t=1563540217
                      • 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 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?

                          • 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.

                            • Yra what necessary? This is all I see on the Text field type. 

                              image_transcoder.php?o=bx_froala_image&h=1695&dpx=1&t=1563821868

                              • 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?

                                • Yra could you post an image of the checkbox you are talking about?

                                  • 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?

                                    • 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. 

                                      • Sorry, probably some difficulties with the translation, I use Google Translate😐  Try to save the field first and then check for a regular expression.

                                        • 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. 

                                          Login or Join to comment.