Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We have time sensitive content, that cannot be seen before a certain date, but we need to give the URL of this webpage before it goes live to advertise for it. What is the best way to get the URL of a node that isn't published, without letting others on the web have access to it?
if you add an umbracoUrlAlias property to a page, you can specify a url that doesn't have to be where it is on your site and you can then advertise that,
when it's published the url will become active.
How is the method for this generating the node url? Is there documentation on the actual Class method?
We are using rules to determine which requests get sent to IIS (Umbraco) and which go to Apache.
this is actually part of the core Umbraco pipeline, so the code is in the core.
So for completeness, it starts here:
Ultimately the aliases are added to the mapping that umbraco will respond on.
but you don't need to worry about that, I would just say if you have an umbracoUrlAlias Umbraco sorts it out :)
However If you have rules managing between IIS and Apache, I can't guarantee that you will always get through to umbraco. this method works best when all requests are going into the umbraco request pipeline (so IIS7+ or config to pass everything in IIS6).
After looking at the rules on the load balancing server, it appears, that for it to work, we will have to reference the alias in the address bar with an additional .aspx after the alias. Not a problem though. Thanks for your help!
As far as I can see in the source (don't hold me up on this), umbraco exposes a String Extension called ".ToUrlSegment()" which it uses to build the url's.
(You need to add "Umbraco.Core" to the usings section).
So you could do something like:
You could probably predict the url by traversing the tree and generate the url from the node names. And if you already know the parent url, then it will be easy to just append the predicted url of your unpublished node.
I haven't tested this so it's just a guess :)
Let me know if it works ;)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted