Support » Plugin: Power BI Embedded for WordPress » Mobile Layout is working

  • Resolved joepbi

    (@joepbi)


    I’ve worked on enabling the mobile layout for all mobile devices.
    I got a simple solution, that works for me:

    Add the following Code:

    <?php if (wp_is_mobile()) : ?>
    layoutType: models.LayoutType.MobilePortrait,
    <?php endif; ?>

    to the embed configuration in the “class-power-bi-shortcodes.php” after (Line 141 in Version 1.0.2):


    settings: {
    filterPaneEnabled: <?php echo ($filter_pane ? ‘true’: ‘false’); ?>,

    I’m not a wordpress developer, so i don’t know if it is done properly. But it works for me 🙂

    Restrictions:
    – Mobile Users will become the Portrait View (Lanscape is ignored)
    – Reports must have a phone layout

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author atlaspolicy

    (@atlaspolicy)

    Thanks for the suggestion. We will consider supporting something like this in a future release.

    Tried this out and it works great…allows you to use the Portrait page layout defined in Power BI Desktop automatically. Would love to see this added into the next release. Nice find @joepbi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mobile Layout is working’ is closed to new replies.