PHP not allowed on Landing Page Templates?

Highlighted
Anonymous
Not applicable

PHP not allowed on Landing Page Templates?

I have created a workflow to create clean, responsive landing page templates the last year.

Upon starting with a different client and trying to use the same workflow, it seems that any new Landing Pages created since the mobile update does not allow the use of the PHP. Which is a major bummer as I use  <?php echo $mContext['bodyElements']; ?> to tell my landing page where the form is to load. 

What is the fix for this? Can I revert to older landing pages?
Tags (1)
4 REPLIES 4
Highlighted
Anonymous
Not applicable

Re: PHP not allowed on Landing Page Templates?

Hi Todd,

The mobile compatible templates no longer use the special PHP statements to mark where the content goes.  Instead, it uses a normal element with class mktoContent to mark where they should go. 
Just put a: 
<div class="mktoContent"></div>
Whereever you want the contents of the landing page to be placed in your template.

Re: PHP not allowed on Landing Page Templates?

Thanks Todd.

That works for the $mContext['bodyElements'].  What is the update for $mContext['headElements']$mContext['bodyAttributes'] and $mContext['endElements']?

Also, when changes like this occur where can we find documentation on them?
Highlighted
Anonymous
Not applicable

Re: PHP not allowed on Landing Page Templates?

Hi Chris,

The $mContext['headElements'], $mContext['bodyAttributes'] and $mContext['endElements'] are no longer necessary.  The new mobile compatible landing pages are able to understand where those elements are in the page without you needing to put them in as a placeholder.

There are some details on what is required for a mobile compatible landing page template here: https://docs.marketo.com/display/public/DOCS/Make+an+Existing+Landing+Page+Template+Mobile+Compatibl...
and there's a new article underway here as well:
https://docs.marketo.com/display/public/DOCS/Edit+a+Marketo+Landing+Page+Template
Highlighted

Re: PHP not allowed on Landing Page Templates?

Thank you Ian!