Cannot display embedded macro within a rich text editor using c sharp
I made a macro that displays all the content from another, specified, document type's children.
Everything worked fine until I tested whether you can include a macro in rich text editor and display it on the content display page. The inserted macro just gets skipped over in the page rendering. Here is a simplified version of my display code if it helps ('maincontent' is the name of the rich text datatype in the document type):
Document singleevent = new Document(this.eventID);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<div class=\"eventtext\">" + singleevent.getProperty("maincontent").Value.ToString() + "</div>");
DisplayElement.Text = sb.ToString();
i guess maybe getProperty isn't the best way of display content? I will keep working on it and if I find a solution I will post it here. As of right now I am kind of stumped
alright, i looked at the source and it looks like it actually is trying to render, but not the correct thing, this is what i got out of the page source (i am trying to insert a youtube macro, it works on other pages that display more traditionally):
Cannot display embedded macro within a rich text editor using c sharp
I made a macro that displays all the content from another, specified, document type's children.
Everything worked fine until I tested whether you can include a macro in rich text editor and display it on the content display page. The inserted macro just gets skipped over in the page rendering. Here is a simplified version of my display code if it helps ('maincontent' is the name of the rich text datatype in the document type):
i guess maybe getProperty isn't the best way of display content? I will keep working on it and if I find a solution I will post it here. As of right now I am kind of stumped
alright, i looked at the source and it looks like it actually is trying to render, but not the correct thing, this is what i got out of the page source (i am trying to insert a youtube macro, it works on other pages that display more traditionally):
<?UMBRACO_MACRO youtubeurl="http://www.youtube.com/watch?v=WLB9MdmAl90" youtubewidth="480" macroAlias="YouTube" youtubealign="1" youtubeheight="385" /?>
looks like it isn't translating the macro, any suggestions?
Tried this code but it actually stripped out the macro code entirely instead or display it:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.