Block Grid Example Website - [object Object] in ba...
# help-with-umbraco
m
Having a play with Block Grid which I hadn't really delved into before. I installed the Block Grid Example Website as a brand new website using 13.3.0 Front end looks fine, images and headlines look fine but Rich Text just has [object Object], whether it's part of a Card Component or its own one. There don't appear to be any errors, neither in the console nor in the command line. Any ideas what I'm missing? Thanks
m
looks like a change is required...
ng-bind-html="block.data.richText.markup"
in https://github.com/umbraco/Umbraco.BlockGrid.Example.Website/blob/main/UmbracoBlockGrid/App_Plugins/UmbracoBlockGrid/BlockViews/richText.html Though you can't simple change your local file as on build the files are set as immutable so are replaced... You have to create a new blockpreview file. say
richTextNew.html
and then change the custom prieview for the block setting in the backoffice.
click the x to remove and then browse to add your new one.
<div ng-bind-html="block.data.richText"></div>
should become
<div ng-bind-html="block.data.richText.markup"></div>
as this is supposed to be a playground.. might be nice to allow for playing with the views etc.. https://github.com/umbraco/Umbraco.BlockGrid.Example.Website/blob/main/UmbracoBlockGrid/buildTransitive/Umbraco.BlockGrid.Example.Website.targets#L11 could be changed to add a condition to only copy once and ignore if files exist/are changed 🙂
Copy code
xml
 <Copy SourceFiles="@(UmbracoBlockGridContentFiles)" DestinationFiles="@(UmbracoBlockGridContentFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoBlockGrid\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
over to ...
Copy code
xml
 <Copy Condition="!Exists('$(MSBuildProjectDirectory)\App_Plugins\UmbracoBlockGrid\%(RecursiveDir)%(Filename)%(Extension)') SourceFiles="@(UmbracoBlockGridContentFiles)" DestinationFiles="@(UmbracoBlockGridContentFiles->'$(MSBuildProjectDirectory)\App_Plugins\UmbracoBlockGrid\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
d
Please have a look at Umbootstrap where I have used Block grid for both layout and features https://umbootstrap.com/
m
Thanks @Mike Chambers that's perfect. Thanks a million!
Will definitely have a look at that Dean, thank you!
h
Can highly recommend Dean's Umbootsrap, it's a fantastic template for using the blockgrid
32 Views