Jump to content

Is there a way to add non-field-attached descriptive text to a template’s backend view?


Michael van Laar
 Share

Recommended Posts

I’d like to add a block of descriptive text (and links) to a template’s backend view. But this description should be detached from all of my fields. So basically I’d like to insert a block of predefined text to a template just like I add a new field.

Should I just create a new field type module which doesn’t provide any input functionality and is only used to display the field’s description? This way I could insert my predefined text just like any other field.

Unfortunately the default field description cannot contain HTML. But I need HTML tags to be rendered to display clickable links.

Link to comment
Share on other sites

  • 6 years later...

I have this same question and found this forum topic from years ago.

I have generic fields I use for different things in various templates - say text areas with names text1 to text4. 

I can't use the label or description options to specify what those fields are used for since that would change based on the template.

I'd like to add a text description above various sections in the admin page edit.

I looked at that module, but it don't know if it is still compatible. This seems like something there would be a common need for.

Link to comment
Share on other sites

1 hour ago, vwatson said:

I can't use the label or description options to specify what those fields are used for since that would change based on the template.

1 hour ago, vwatson said:

This seems like something there would be a common need for.

True, and that need was satisfied 10 years ago 🙂 You can set (almost) every field's label and description in template context:

 

  • Like 3
Link to comment
Share on other sites

14 hours ago, vwatson said:

I have generic fields I use for different things in various templates - say text areas with names text1 to text4. 

A bit off-topic, but I was thinking yesterday how in this situation it would be nice if you could also override field names.

So when templating, instead of having the below (which is a bit meaningless when you come back to it later):

$person->text3
$person->text1
$person->text2

You could instead have:

$person->overview
$person->quote
$person->biography

Maybe it wouldn't be possible/practical though.

Link to comment
Share on other sites

To insert a block of self-standing explanatory text, I created a text field, added it to a template, edited the page and saved it, then went back and set the visibility of the field to Open and Locked.

That's a simple example that could have been done in the field description, but I'll be able to use this technique for longer instructions to end users.

 

image_2022-06-17_114007982.png

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...