In our email we have multiple content blocks and I am trying to call the content block within a cloud page using a simple AMPscript code something like below
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
<title>test</title>
</head>
<body>
%%= TreatAsContent(ContentBlockByKey("CONTENT_BLOCK_KEY")) =%%
</body>
</html>
But I get an error page with status code 500
Could anyone tell me how to call a content block using AMPscript in a CloudPage? or any other way to resolve this easily?
%%=TreatAsContent(ContentBlockByKey("CONTENT_BLOCK_KEY"))=%%