Jump to content

Preserve Formatting in Database Category Articles

Go to solution Solved by Foxtrek_64,

Recommended Posts

I have a custom page which displays an announcement database I have built (separate from the built-in announcements system). This database syncs with an announcements board where users may post comments.

I am using the Category Articles template to display my announcements but I am not happy with how the truncation is working. By default, the template renders the data like so:

<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_bottom' data-ipsTruncate data-ipsTruncate-size='7 lines' data-ipsTruncate-type='remove'>

I would theorize that the data-ipsTruncate-type is what determines how the truncation is handled, though I am unsure what other values are valid here.

The current truncation effect seems to be doing two things:

  • Shorten to seven lines maximum - this I am fine with.
  • Remove all formatting - this breaks content such as lists, and I would like to avoid this.

I have looked through the database settings but I was unable to find anything that affected this by default. Did I miss something in the options that would resolve this?

If not, how can I change this to behave the way I would like it to. Is there any developer documentation available for review so that I can see the what these properties control and what their values are?

Link to comment
Share on other sites

29 minutes ago, bfarber said:

The truncate javascript widget removes formatting to get the number of lines right. You could change this to get a different effect:





I have tried using both 'hide' and 'none' as values. After saving and refreshing, I can see the new value when inspecting the html, however there does not seem to be a change in behavior.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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