London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

No I don't want it to show on mobile

Vote:
0

Hi,

Haven't had much time to look at EPiServer 7, but I have started experimenting with display channels and blocks a bit. 

I have a question concerning rendering. 

If I have a block or page containing something and I only want it to be displayed/rendered in a certain channel. 
As an example;

I don't want a block or page to be rendered if surfing the site on a mobile phone?

Is it possible? How would I do that? 
I know I can have diffrent templates for diffrent channels, but what if I don't want it to render at all on a mobile phone?

:-)

#66427
Feb 28, 2013 12:45
Vote:
0

You could have a separate renderer for the channel (could make sense for blocks), and just not render anything. But this is not so much a technical question, it is more conceptual. Would you rather return 404 for the page if requested on mobile?

Display Channels let you vary rendering - if you want. It does not have to, but you need to think what you would do instead.

/Steve

#66429
Feb 28, 2013 13:30
Vote:
0

I see. Yes, pages doesn't make sense at all. I didn't really think that through. I'm just trying to understand how I can use channels to make a mobileversion lighter. Maybe I have a few web-specific blocktypes that I never want to render on a mobile?

#66430
Feb 28, 2013 13:50
Vote:
0

If you don't want the block to render, create a renderer for it, but keep it empty. For 7.1, you can also use personalization to do this, as you can use visitor groups on blocks.

#66438
Feb 28, 2013 14:53
Vote:
0

Thank you for the answers :-)

#66439
Feb 28, 2013 14:56
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.