Copied to clipboard

Flag this post as spam?

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


  • lpalou 5 posts 85 karma points
    Jan 23, 2017 @ 11:22
    lpalou
    0

    Render node and send properties from another one - implement white labels

    Hi guys,

    My Umbraco site starts from one parent node root from which all the pages and subpages are hanging.

    Now I need to implement white labeling to my site. This means that I should be able to access any page like /{whitelabelname}/page1/subpage1.

    The resulting page should be the same as /page1/subpage1 with the slight difference that the whitelabel properties should be used.

    To achieve this I save one node (independent of the main site) with the white label properties like color, logo, etc...

    I have already implemented an IContentFinder to recognise the pattern /{whitelabelname}/page1/subpage1 and render the appropriate node and this works just fine.

    Where I'm lost now is in how to send the white label properties. The best place would be in the IContentFinder itself because I already access the white label node at that point. However, the node I render comes from the main site which has no idea of that white label.

    The first alternative that came to my head is to run some code in every request to detect if the white label is present in the URL and set the ViewBag with the properties if that is the case, but I'm not so happy about this solution.

    Any ideas on how I could achieve this or how I could set the white label properties in the IContentFinder?

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft