Device Specific Content
Created by Orckestra
How to target content to mobile and desktop devices
To show some content to visitors with mobile devices different from those with desktop devices:
- Edit a page.
- Insert the Orckestra.Web.Html.DeviceSpecificContent function ( Insert | Function) or add the following code:
Expand code - Set these parameters:
- Mobile (Mobile Content): The content to show to visitors with mobile devices.
- Desktop (Desktop Content): The content to show to visitors with desktop devices
Viewing content in mobile display mode
If you are using a desktop browser, you can still see what the content intended for mobile browsers will look (for testing purposes etc.) by switching to mobile display mode.
- Open the page with mobile content in your browser.
- Append the query parameter
cmsdisplaymode=mobile
to the URL in the address bar, for example:http://contoso.com/Page?cmsdisplaymode=mobile
- Press
ENTER
.
Important. To view pages in mobile display mode, you should be logged into the CMS Console in the same browser.
Have a question?
Post it to the C1 CMS Foundation forum.