I had the same problem when trying to add a google map to a blog post
I have found the problem but I’m not sure how to fix it
As this forum post explains you have to set the text editor to run at server for the macros to show up otherwise they get commented out however because uBlogsy renders the text editor from a razor script I don’t know how to run the uBlogsyContentBody at server from within the razor script
And the the macos render fine however this is not a solution because you end up with only the body of the blog post and is only fix’s it for the blog post page no the home page..
That was me messing around trying to get it to work, this line of code works if you put it in a template file but then you end up this the post displaying twice but if you put it in the cshtml file it just renders nothing hence why you can see it in my markup
If I add html to a post its fine, the problem is that the RTE is not been run at server therefore any macro in the RTE is just been ignored and not run correctly
I think you need to change the way uBlogsyShowPost.cshtml works
There is a problem with rendering a macro from inside a macro, and you need to use umbraco:item.
One way you can get around this issue is to separate the uBlogsyShowPost script into 2 files. That way you can render umbraco:item in the master page between the 2 scripts which display everything else.
Embed Videos
Hi!
Love the Blog, better than the existing Umbraco Blog thats for sure!
I am trying to embed videos into my blog, but haven't been able to do so...
I tried using the oEmbed Macro and a couple others without success.
Am I missing something? I'd like the ability to embed youtube and vimeo videos.
Thanks,
Owen
I had the same problem when trying to add a google map to a blog post
I have found the problem but I’m not sure how to fix it
As this forum post explains you have to set the text editor to run at server for the macros to show up otherwise they get commented out however because uBlogsy renders the text editor from a razor script I don’t know how to run the uBlogsyContentBody at server from within the razor script
I tried adding this to the uBlogsyPost Template
<umbraco:Item field="uBlogsyContentBody" runat="server"></umbraco:Item>
And the the macos render fine however this is not a solution because you end up with only the body of the blog post and is only fix’s it for the blog post page no the home page..
I hope someone can figure this out
Can you paste the rendered markup.
Theres some of the markup from a blog post
let me know if you need anything else, im free for the next few hours and can test stuff on my server for you would be good to get this sorted :)
just realised i left this line of code on my site
That was me messing around trying to get it to work, this line of code works if you put it in a template file but then you end up this the post displaying twice but if you put it in the cshtml file it just renders nothing hence why you can see it in my markup
Interesting...
Have you tried pasting raw html in there rather than a macro? Or is that not an option?
If I add html to a post its fine, the problem is that the RTE is not been run at server therefore any macro in the RTE is just been ignored and not run correctly
I think you need to change the way uBlogsyShowPost.cshtml works
Damn I don't think my last post got saved.
You're right about using umbraco:item.
There is a problem with rendering a macro from inside a macro, and you need to use umbraco:item.
One way you can get around this issue is to separate the uBlogsyShowPost script into 2 files. That way you can render umbraco:item in the master page between the 2 scripts which display everything else.
I love how fast the umbraco community is at help.
Replace the line @Html.Raw(d.GetProperty("uBlogsyContentBody").Value) in uBlogsyShowPost.cshtml with:
@Html.Raw(umbraco.library.RenderMacroContent(d.GetProperty("uBlogsyContentBody").Value, d.Id))
http://our.umbraco.org/forum/developers/razor/21275-Rendering-RTE-with-embedded-macros-in-Razor
is working on a reply...