Keeping php variables



How can I stop SurrrealCMS from removing my php variables eg <?php $pageName = "Home"; ?> I need this function.

Thank you.


Hi there,

You can use PHP in your pages, just not inside content regions. Outside of content regions is totally fine, and the code won’t be modified in any way.


Hi Cory

I’m using them in the body tag and top nav links but they are being removed from the page, after publishing.
I can see things are not working because they are missing.

Please help, thank you Cory



I get this error “no numeric noise key 1022” in place of the variable after publishing


Hi Cory

I think I fixed it, I just removed them from body and put them in the head sections, seems to be working now.

Thanks mate