0
votes

I would like to override a system template variable (TV) setting in Modx Revolution. Specifically, I would like to turn off the 255 character limit set on *description. Is there a way to do so?

2
modx_site_tmplvars > description is limited to 255 chars in the database. I'm not sure why you'd want that longer, unless you're planning to include a really long TV description. There are many ways to achieve things in MODX, what are you wanting to do?do?okyanet
Are you referring to Modx Revo 2.2.7+? My modx_site_tmplvars only contains custom TVs. || I am using *description as core content on my website, hence the need for a >255 character limit. I didn't want to create a custom TV that would duplicate a preexisting TV in input type, title, and purpose. I also like the convenience of filling out a TV that's on the first page for every document's input.Brandon Lebedev

2 Answers

0
votes

I think you're referring to resource fields and not TVs. It appears under pagetitle, longtitle, etc?

I wouldn't try to change these, and instead create a text TV to hold your description. You can hide the default description field using Form Customisation, and if you want this to be immediately visible when you edit a resource (not in another tab) you can change the System Setting tvs_below_content to 'Yes'.

0
votes

Actually, no. The description is hard coded in the database to that length and as such there is no point in changing it as it will only store that amount in the table.

What you can do, is to create a Template Variable and add it to the template for the pages in question.

A template Variable Tab should appear on each Resource page for you to utilize.

By the way, *description is not a Template Variable, it is a Resource Setting.

In the element tree, right click on Template Variables and create a new one, assign it to the Template, and edit a Resource using that TV.

The table definition is mediumtext so you have plenty of room.

In your pages you would simply use: [[*templateVariableName]] to access it while getResources utilizes [[+tv.templateVariableName]]