get content of page/create HTML page in fly Options
lpastor
Posted: Friday, October 31, 2008 11:32:19 PM

Rank: Aficionado

Joined: 8/4/2008
Posts: 111
Location: Serbia
Hi

I will try to explain my problem.

I have a LerningPage document type with Title, Description and Content properties

in title and description properties user can write a text (it is text filed) but Content is rich text editor.

User request is that he can browse a site and mark some of this page and when we finished he want one BIG page that will content everything on marked pages Title, Description and Content.

I create a custom user control that go to DataBase get all neded data from Table cmsPropertyData
then on page template just in body tag I call this macro and I can create page ...

BUT I have a problem when user in Content put some macros ... I have some macro that user can put in Content (Rich text editor) and it just get some text from some text node.
So insted of test I get macro calling

<?UMBRACO_MACRO textNodeId="1056" macroAlias="ReturnTextOfNodeId">

Is there a solution for this... I need to get a result of macro instead of umbraco macro call

HELP
Dirk
Posted: Saturday, November 01, 2008 9:52:13 AM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,123
Location: Belgium
Hi lpastor,

In v3, you can use RenderMacro() (this that is the name) to render the macro, in v4 this is no longer possible due to mater pages syntax introduction.

I see two possibilities:
- Either do the macro replacement yourself (It'll involve some regex stuff though...); seems a good idea if you've got a limited number of macro that can be used.
- Or, try to find similar code in the umbraco source. I haven't done something similar, but a nice debugging session could do a lot. I would set a breakpoint somewhere in the default.aspx to start with.

Hope this helps.

Regards,
/Dirk

level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
lpastor
Posted: Sunday, November 02, 2008 1:06:42 PM

Rank: Aficionado

Joined: 8/4/2008
Posts: 111
Location: Serbia
Hi Dirk ,

I'm not sure that any of this solution is sutable for my problem.

Problem is that in rich text ContentBody prpertyu I give a user posibility to mix palin text and usage of my macro that is siply return HTML code of some node...

so my content can look somthing like

".... bla bla bla :
<?UMBRACO_MACRO textNodeId="1056" macroAlias="ReturnTextOfNodeId">
bla bla bla bla
<?UMBRACO_MACRO textNodeId="1057" macroAlias="ReturnTextOfNodeId">
bla bla bla bla bla
<?UMBRACO_MACRO textNodeId="1058" macroAlias="ReturnTextOfNodeId">
bla bla bla bla bla bla ...."

and when i want to create page in fly from content I get only "...bla bla bla bla bla bla ..."
I don't know how many times user are used macro .

Maybe in arhitecture of this solution is wrong...

Maybe I can put my questyion this way:".... is Umbarco store somewhere complete html render code of page???...." ...Can I use for this solution UMBRACO.config file stored in Data folder?







lpastor
Posted: Friday, November 14, 2008 8:47:20 PM

Rank: Aficionado

Joined: 8/4/2008
Posts: 111
Location: Serbia
any idea ???
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.