I have added 150x150px images to the beginning of my blog post so that is will show up on the blog holder. However, I will like to increase the content length so that it looks better.
I have looked in the BlogHolder.php file for info ???
see page
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I have added 150x150px images to the beginning of my blog post so that is will show up on the blog holder. However, I will like to increase the content length so that it looks better.
I have looked in the BlogHolder.php file for info ???
see page
Hello steve_nyhof,
You can increase the content length by changing the following code in your "/blog/code/BlogEntry.php"
Current Code :
function ParagraphSummary(){
if(self::$allow_wysiwyg_editing) {
return $this->obj('Content')->FirstParagraph('html');
} else {
$parser = new BBCodeParser($this->Content);
$html = new HTMLText('Content');
$html->setValue($parser->parse());
return $html->FirstParagraph('html');
}
}
New Code :
function ParagraphSummary(){
if(self::$allow_wysiwyg_editing) {
return $this->obj('Content')->BigSummary(200);
} else {
$parser = new BBCodeParser($this->Content);
$html = new HTMLText('Content');
$html->setValue($parser->parse());
return $html->BigSummary(200);
}
}
I hope this will help you :)
Yes and no.
I have had this issue with wordpress also, it removes the html - I want the pictures to stay - any ideas for that?
Thank you,
Steve
I got my page to look good by adding a side area.
I just need to get my archives working - have it in dev mode, any ideas to fix this? I have tried some things on the forum, but I get the same result.
Hello steve_nyhof,
If you want to increase the content length, then before that it must remove html tags. Because the content length which we specify for display content is counted by word. If the html tag has not removed then may possible it return invalid html and it disturb the whole design of your site.
I kind of thought so, I'm good! Thank you
@MULTIDOTS Thank you for sharing that bit of code. I just used it and it worked great. Thank you!