MiP1 Posted July 29, 2017 Posted July 29, 2017 Hello, If I activate the option "Show Records like articles" I get a short preview of each article (as plain text) listed on the page. There are a few things I would like to change and hope, you can help me. I'm missing the formatting in the listing. If I click on "Read More" I can see some the links, some bold text , but this is missing on the listing page. Basically I would like to have something like here: https://invisioncommunity.com/news -- you can see there, that the text is formatted. Similar to the question above -- I would like to have the inserted images displayed on the listing page exactly as they are displayed in the article itself (position between the lines, size, centered or not). How can I change the length of that preview text? Ideally I would like to have a way to define it in the editor -- something like a BB code, but any other way to change the length of the preview text is very welcome. Am I missing some options somewhere or do I need to edit a template? If a template needs to be edited, could you please explain which one and how? I'm really not familiar with the coding Thanks in advance!
opentype Posted July 29, 2017 Posted July 29, 2017 10 minutes ago, MiP1 said: Am I missing some options somewhere or do I need to edit a template? Yes, you would need to change that manually in the template. The template is the one you choose in the database settings when activating the article mode. The setting is called “Articles template”. In can be edited under ACP → Pages → Template. (Usually you want to create your own one first instead of editing the stock template.)
MiP1 Posted July 29, 2017 Author Posted July 29, 2017 Yes, thanks, I've figured out how and where to change the length, but it is still not clear how to activate the display of the formatting and the images.
opentype Posted July 29, 2017 Posted July 29, 2017 {$record->_content|raw} instead of … {$record->truncated()|raw}
MiP1 Posted July 29, 2017 Author Posted July 29, 2017 Interesting, thanks! But it looks like if I don't use truncated() there, it ignores data-ipsTruncate-size='10 lines' in the line above and displays only the first paragraph of the text or image, if posted at the top. So using _content requires a different setting for the length. I've found some documentation about Truncate, but can't find anything about _content...
opentype Posted July 29, 2017 Posted July 29, 2017 Full HTML can’t be easily cut off somewhere. That’s the reason the stripped article text is used in these templates.
MiP1 Posted July 29, 2017 Author Posted July 29, 2017 Then I wonder how they did it on the news page https://invisioncommunity.com/news
opentype Posted July 29, 2017 Posted July 29, 2017 That’s custom. You can look it up in the source code if you want. It has a gradient added and uses a fixed height with cut-off overflow.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.