featdd / dpn_glossary

Glossary extension for TYPO3

Home Page:http://typo3.org/extensions/repository/view/dpn_glossary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

max characters for field tooltiptext

tantebootsy opened this issue · comments

As to https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute and https://stackoverflow.com/questions/8516235/max-length-of-title-attribute there's not official spec for the length of the title attribute. You limit the field to 256 chars, which in some cases is very low – e.g. if you render the title value via JS-tooltips. Can you set the max chars-limit up to 512 chars? If not, below you'll find TS to access the first description-text via TS. Maybe you want to add it to your documentation:

plugin.tx_dpnglossary {
  settings {
    termWraps {
      default {
        typolink {
          ATagParams.cObject = CONTENT
          ATagParams.cObject{
            table = tx_dpnglossary_domain_model_description
              select {
                where.dataWrap = {#uid}={field:uid}
                max = 1
                pidInList = {$storagePidOfGlossaryRecords}
              }
              renderObj = TEXT
              renderObj {
                field = text
                # optional stripping of html tags
                # stripHtml = 1 
              }
              stdWrap.wrap = title="|" class="dpnglossary link"
          }
        }
      }
    }
  }
}

Hi @tantebootsy,

the limiitation comes through the SQL field definition as "varchar(255)".
I would'nt like to touch this by now, but you're free to extend the table with a "text" field type for an extended tooltip and use it as a value for the title.

Greetings
Daniel