How to create a standalone page and open it in a new browser window?

Hi Team

 

I'd like to create a custom page like the Email Template Content Builder and open it in a new window.

The actual EmailContentBuilder implementation uses BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/MultiLanguageEmailContentBuilder to open the new Module in a new window.

 

How does this work? and how can I build a similar behavior?

 

Thank you

Mohamed

 

Like 0

Like

3 comments

Hello Mohamed,

 

To open page in a separate window use:



window.open(youePageUrl);



MultiLanguageEmailContentBuilder code can be found in EmailTemplate package and used as a reference.

 

Best regards,

Bogdan S.

Bogdan Spasibov,

 

Thanks for the reply.

 

The MultiLanguageEmailContentBuilder module inherit from ContentBuilder schema (the ContentBuilder doesn't have a parent object).

And I have successfully opened the ContentBuilder page in a new window using:

window.open('BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/ContentBuilder').



Now, I copied the ContentBuilder module into MyCustomBuilder.

When I open MyCustomBuilder I got this message:

 

require.js:168 Uncaught Error: Script error for "MyCustomBuilderStructure"

http://requirejs.org/docs/errors.html#scripterror

    at makeError (require.js:168)

    at HTMLScriptElement.onScriptError (require.js:1744)

 

Any Help! 

 

Thank you

Mohamed



 

Mohamed Ouederni,

 

Hello,

 

The link you've specified in the very first post is not a complete link that is opened upon clicking the "Edit" button of the template wizard. Here is an example of the complete link: BasePath/0/Nui/ViewModule.aspx?vm=BaseViewModule#ConfigurationModuleV2/MultiLanguageEmailContentBuilder/8f5c1959-25e0-45bc-a62d-04b516502a82/EmailTemplate/Body.

 

In your case the system cannot process the bold text part and returns an error since which template should the system open when calling MyCustomBuilderStructure?

 

It's better to:

 

1) Replace the MultiLanguageEmailContentBuilder and deploy your own logic there or

2) Use some existing section and edit page to call it when clicking the button so the system could open something (but you need to develop additional logic of the URL creation that could open a correct record when clicking a button).

 

Uncaught Error: Script error for "MyCustomBuilderStructure" won't provide us with much information where the actual problem is, please use one of two ways I mentioned above to achieve your business task.

 

Best regards,

Oscar

Show all comments