This plugin is no longer necessary! Support for device previews was added to the Craft core in 3.6.
Portal brings advanced Live Preview capabilities to Craft CMS.
Preview your content on tablet & mobile in the device emulator and add additional target templates for users to switch to, all within the primary Live Preview window.
Check out the introductory video.
Available in the plugin store for $29.
This plugin requires Craft CMS 3.0.15 or later.
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require angellco/portal
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Portal.
There are two parts to Portal right now and both affect Live Preview.
The device emulator is a tool that lets your users preview their content as it will look on different device screens, for simplicity there are only three options: Desktop, Tablet and Mobile. It looks like this:
You can switch between devices, change the orientation and also the zoom level.
If you wish to disable this feature then add the following to config/portal.php
:
<?php
return [
'showLivePreviewDeviceEmulator' => true
];
Targets are alternative templates that you want to make available to Live Preview, you can add them by going to the Portal tab in the main navigation.
If you have multiple Sites then you can load different templates for each Site, as well as restrict a Target to either a Section, Category Group or Product Type.
Once you have a Target added you will see a select input appear in the Live Preview window allowing your users to efficiently preview their content across multiple templates.
Brought to you by Angell & Co