0

I was doing some hands-on exercises for learning SSJS using CloudPage calling a HTML content block for my ssjs script.

My question is : When creating a test stub cloudpage to run some ssjs exercises, I dont want to use the root folder of the website to host my exercise web page.

How can I change the actual physical location of the CloudPage within the Marketing Cloud folder structure?

1 Answer 1

0

MC Cloudpage isn't designed to build a full website, but the most common use case is to build a landing page.

So what you can do is:

  • Copy directly the HTML content block that you want to use for your SSJS exercises to the CloudPage

or

Upload the HTML content to content builder then in the cloudpage:

  • Use reference content block (point-and-click)
  • Or use AMPscript to render a HTML content block

A sample AMPscript code:

%%[

var @contentBlockID
set @contentBlockID = 123 /* Content Builder\Exercise\Banner */

]%%
%%=ContentBlockByID(@contentBlockID)=%%
1
  • Specifying a value for site key allowed me to specify a test_random_number as a suffix so the root folder was no longer used as the URL for the landing page I was trying to test. Thanks much. Dec 1, 2023 at 19:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .