-
AuthorPosts
-
March 17, 2016 at 2:10 pm #901296
I am trying to put formatted text on home page so there is more text as well as pictures. Using uber template. Followed the demo process of creating a blog post and displaying it based on category to get an article displayed on the home page. It displays on the home page but all the formatting is stripped out. I have a formatted list that is want to use. I have enclosed it with the <div class="container"> to try and protect the code from being pulled out that does not work either. Is this expected? I am using blog format #2, but any other format seems to take out the code. I have the same content displayed as an article and everything works as expected. When I view the page is view source I can see most formatting is missing. Can not figure out how the software selectively does that. Is there a better way to put this text on the home page?
Here is the link to the home page home page with code taken out
the exact same page as an article same content linked to as an articlePankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
March 17, 2016 at 4:42 pm #901380Hi
its default Joomla module that does not allow the special characters to show them intro text .
You need to edit the core files . Go to ~siteroot~/modules/mod_articles_category/helper.php
remove this code$introtext = str_replace('<p>', ' ', $introtext); $introtext = str_replace('</p>', ' ', $introtext); $introtext = strip_tags($introtext, '<a><em><strong>'); $introtext = trim($introtext);
Here > http://prntscr.com/aggmen
Hope it helps .
1 user says Thank You to Pankaj Sharma for this useful post
March 17, 2016 at 6:04 pm #901414Worked like a charm, I never would have found that in years of looking!. Is this a security concern at all in taking out the code?
I can see why it might be there in displaying content not formatted for home page display.
Thank you for the fast response and solving the problem. Problem solved.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
March 18, 2016 at 1:06 am #901558Hi
Generally its html character stripped for intro text to show it in better way
Glad it works for you.
Have a good day ! -
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by Pankaj Sharma 8 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum