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,
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).
Thanks Kevin.
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:
Services.ContentService.GetById(1234).Name.ToUrlSegment()
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.
URL for Unpublished Page
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?
Hi
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.
https://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlalias/
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.
Hi,
this is actually part of the core Umbraco pipeline, so the code is in the core.
So for completeness, it starts here: https://github.com/umbraco/Umbraco-CMS/blob/d50e49ad37fd5ca7bad2fd6e8fc994f3408ae70c/src/Umbraco.Web/Routing/AliasUrlProvider.cs#L60
Ultimately the aliases are added to the mapping that umbraco will respond on. https://github.com/umbraco/Umbraco-CMS/blob/da85e4eb288717e4dd04be9419b6c04b053f9ed3/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs#L62
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).
Thanks Kevin. 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: Services.ContentService.GetById(1234).Name.ToUrlSegment()
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...