Hello,
How are you today?! Good, I hope!!
Just writing with a pulsecms support question:
Using the latest pulse release. Trying to embed some blocks in non-pulse pages using the Embed PHP link at the bottom of the blocks admin page.
Having a couple issues with it:
First off, the embed works, BUT, it only ever shows my original block content; if I go into CMS admin and edit a block I have embedded, the embed still only shows the very first content, not the edited content. Even if I look in the content folder, my changes are there in the blocks text file, but, they never make it to the embedded output.
Also, the “end_point.php” file (in the root of the CMS install folder) that the embed calls wraps all the blocks content in a “new html page”, which looks like:
<title>Pulse CMS</title>
</head>
<body>
<?php echo \pulsecore\page\end_point\process( $_GET, $_POST, $_COOKIE ); ?>
<script type="text/javascript">
document.addEventListener(
'readystatechange',
function() {
// receiver
function receiver_handler(evnt) {
var message = evnt.data;
var source = evnt.source;
if (message.msg && (message.msg == 'poll')) {
//var content_height = document.body.scrollHeight;
var content_height = Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
source.postMessage( {msg: 'content height', height: content_height}, '*' );
}
};
window.addEventListener( 'message', receiver_handler, false );
},
false
);
</script>
</body>
SO, If I’m trying to embed a block in an existing web page, all of the above data breaks the existing page.
The <?php echo \pulsecore\page\end_point\process( $_GET, $_POST, $_COOKIE ); ?> line in the above works in an embed, but, the rest of the code breaks an existing page when embedded.