Copied to clipboard

Flag this post as spam?

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


  • Mikael Mørup 297 posts 326 karma points
    May 05, 2010 @ 09:53
    Mikael Mørup
    0

    Preview pages programatically

    I know this question might seem strange but.....

    Is it possible to preview pages in an Umbraco site programaticallay, from a process running somewhere else than in the Umbraco sites context ?

    I want to allow someone to create some pages, probably with /base or the Umbraco webservices, but they will be on another site. But i still want them to be able to preview the pages they create. So basically from Umbraco site A (or maybee just a plain asp .net page) i want to  create and preview pages in Umbraco site B.

    I know the preview is normally done in the backend, and probably in the context of some user, but is my idea at all possible ?

    Mikael

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    May 05, 2010 @ 11:13
    Aaron Powell
    0

    Preview requires a logged in CMS user and then it goes via a query string parameter. So if you can do both of those things then you'll be all set.

  • Mikael Mørup 297 posts 326 karma points
    May 05, 2010 @ 11:26
    Mikael Mørup
    0

    Thanks.

    That was why i asked the question the other day about logging in a user programatically. Which you also kindly answered :-)

    What eludes me for the moment is how to actually create the logged in user context from a remote process.

     

    Mikael

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    May 05, 2010 @ 12:01
    Aaron Powell
    0

    You'll have to do single-sign-on, which is always a real pain in the ass to achieve. You're probably better off making your own preview engine :P

  • Mikael Mørup 297 posts 326 karma points
    May 05, 2010 @ 15:03
    Mikael Mørup
    0

    Sounds scary. (which often is a good reason to try)

    I guess that's what canvas mode editing does ?

  • Petr Snobelt 923 posts 1535 karma points
    May 05, 2010 @ 16:38
    Petr Snobelt
    0

    BTW: Will be great if it's possibel to change settings which require user to be logged in to view preview of page.
    Sometines will be helpful if it is possible to send link to preview by email etc.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    May 06, 2010 @ 00:26
    Aaron Powell
    0

    Mikael - no, Canvas runs in the scope of the logged in user. What you're wanting is cross-domain logins, ala single sign on. You need to start a session on the server, and that's where the problem lies.

    Petr - That would pose a massive security risk though

  • Mikael Mørup 297 posts 326 karma points
    May 06, 2010 @ 10:01
    Mikael Mørup
    0

    OK.

    Well maybee we can work around this, if it's too complicated.

    I would just like to awoid having to sync. templates, doctypes and CSS between 2 sites, that are not otherwise identical, because that's a pain in the neck too.

Please Sign in or register to post replies

Write your reply to:

Draft