3

I need to create a few articles with very long titles, but it seems like Joomla has a maximum article title length of around 256. How can I increase this limit?

  • Not possible with native Joomla articles. In the #__content table, the title has a char length of 255. Why do you need more than 255 characters? – Dennis Heiden Aug 14 '17 at 13:39
  • @DennisHeiden My boss wants a specific format for the article titles, and they tend to be really long. Is there a way to modify the #__content table? I'm willing to modify the code or database directly. – Dan Aug 14 '17 at 18:14
3

After reading the comments under your question:

You could modify the #__content.title column but bear in mind that this involves a potential risk of data lοss if a future Joomla update contains database alterations for that table. Generally modifying in this way the core is not a recommended practice.

The title column could be changed with a MySQL statement like the following:

ALTER TABLE `jos_content` CHANGE `title` `title` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';

* Replace the jos_ prefix with your current one.

This is also easily changeable through the GUI of PHPMyAdmin.


However, the above should be your last option and you it would be best to try and come out with other ways to achieve the desired result, depending on the use case.

For example, you could use the com_fields to add extra custom fields for the article title. Something like short title and long title, or take advantage of the read-more (intro-text) of Joomla Articles.

If you could give more details about the format of the articles titles and the purpose this format will serve, we might be able to offer more creative ideas.


Update:

For anyone that might arrive here, seeking for the same, @Dan created a new Q/A answer, as a response to my comment below:

@Dan - I am not 100% clear of what you want. Do you want instead of the actual article title, to display a summary of the article that will be the link to the article? Have you tried to use the intro-text feature to display a short introduction below the article title? Can you present visually your ideal result?

The new Q/A is: How can I create a page that links to all articles with fake long titles?
There @DennisHeiden provides an answer on how to use the read-more (intro-text) feature to achieve this.

  • Basically, the links to the article need to be the full citation of the journal article they summarize. Right now I'm using a category view to display all of the articles (which shows their title), but if you have another way of displaying a list of all articles in a category (including subcategories) that has links to articles with text other than the title of the article, I'm interested. – Dan Aug 14 '17 at 20:49
  • @Dan - I am not 100% clear of what you want. Do you want instead of the actual article title, to display a summary of the article that will be the link to the article? Have you tried to use the intro-text feature to display a short introduction below the article title? Can you present visually your ideal result? – FFrewin Aug 14 '17 at 23:02
  • I'm creating a "publications" page for an academic website. I want a page that lists the citation of every publication, with a link to the full text of the article. – Dan Aug 15 '17 at 22:43
  • Each article in the list right now is a page with the abstract, a few tags, and a link download a PDF. I does the intro text just display the beginning of the article? If so, I don't want it. – Dan Aug 15 '17 at 22:48
  • Intro text = the free text above the "read more"-line in the editor, you can config the appearance, you can even fake a linked article headline (instead of displaying the real short title) by using overrides in your template for the com_content views (list, article etc.). I would do that instead of changing the char type / length in the db. – Dennis Heiden Aug 16 '17 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.