Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Alexander Croner 71 posts 282 karma points
    Sep 27, 2017 @ 07:18
    Alexander Croner

    Making page (widget) not visitable/surfable

    Maybe I've missed something obvious... but I can't seem to find anything obvious about this.

    I've got a node in the root called 'Widgets' where I can put some type of pages (image slider for example). Which are then shown for example through a contentpicker on my startpage (through RenderTemplate) or on other subpages to my site.

    But I don't want those widget pages to be browsable by their own! Only when I render them through RenderTemplate!

    Anyone have any idea how to accomplish this easily?

    As far as I've understood, if they have a template they get an url - so thats the 'problem' I presume.

  • Nigel Wilson 944 posts 2076 karma points
    Sep 27, 2017 @ 18:40
    Nigel Wilson

    Hey Alexander

    One workaround is to have a default template for the widgets and within that template (or controller) you have a redirect - maybe back to the home page of the site.

    A bit clunky but it works.

    Another possible option is to have the UmbracoRedirect property on the Widget and set this to the home page so that Umbraco handles the redirect. For this to be easily managed on an ongoing basis it would be ideal to add an event handler to automatically set the redirect each time a new Widget is created.

    Hope this helps.


  • Alexander Croner 71 posts 282 karma points
    Oct 05, 2017 @ 07:56
    Alexander Croner


    That wouldn't work since the template is what I render through RenderTemplate() to show my template...

    And for a UmbracoRedirect property on the widget to work, I would be able to know if the template is rendered through RenderTemplate() or through direct browsing... which isn't possible as far as I have understood, or have I missed something?

Please Sign in or register to post replies

Write your reply to: