How/where to set the layout of virtual pages?

Currently setting up MailPoet on a site and notice the virtual pages that MP sets by default for Manage subscriptions page, Confirmation page and Success page appear with the content on the left instead of being centered.

Ex.: Here’s a screenshot of

https://brickslabs.local/?mailpoet_page=subscriptions&mailpoet_router&endpoint=subscription&action=confirm_unsubscribe&data=eyJwcmV2aWV3IjoxfQ

The site does already have a Page template that applies to all static pages with Post Title and Post Content and the regular Pages appear fine.

Is there a way to set a layout for these type of virtual pages?

TIA.

define relative css for that page ?

For that we would need to add a custom body class for pages that have ?mailpoet_page and then style afterwards. While that solve the issue in this particular situation, it is limiting imo. There should be a way to design such pages in Bricks editor and be able to control not just the styling but also what elements appear (like in a sidebar layout).

Is there not a Catch All (type of Template) equivalent in Bricks like there is in Oxygen that would apply to all the pages of the site (unless there’s one more specific that would override it)?

I created a new page and added the short code [mailpoet_page]… but the short code is just not rendered? I also tried using a code block and do_shortcode… nothing.
Anybody solved this in Bricks yet?

Update: I ended up using the auto generated mailpoet page. That seems to work, although I had to use external styles and a default index template to get it to display correctly.

Would be great if this could be easier…

I also just bumped into the problem of lack of support for MailPoet. Its way of working is bizarre. It displays the main page with parameters:

https://mydomain.com/?mailpoet_page=subscriptions&mailpoet_router&endpoint=subscription&action=captcha&data=eyJjYXB0Y2hhXjMHN3ayJ9

…which completely fails to plug the support through the site. Also, there are no working shortcodes, or I can’t find them, so I can’t make a subscription form on the Bricks page.

Hi, late answer but in case that helps…

I also noticed the [mailpoet_page] shortcode doesn’t render with Bricks.

Here’s the solution:
I followed Mailpoet’s instructions to have custom pages. I created a new page for each generated page (page are you sure to unsubscribe, page confirmation you’re unsubscribe, etc).
I edit them in Bricks, so that they have a good and nice layout.
But as the [mailpoet_page] shortcode was not rendering, I actually then opened the page with regular WordPress and added it in the Gutenberg section. Simply. You could also create the whole content of the page in Gutenberg, with the shortcode.
Then in the Bricks version of the page use the Content widget to insert the WordPress content of the page wherever you want.
Save, have a look using Mailpoet preview link in the settings, it works.

To sum it up, the shortcode doesn’t render if added in the Bricks editor.
You need to add it in Gutenberg and then retrieve it in your Bricks design using the Content tool.

I hope that helps, it took me an hour to figure it out!

1 Like