• twitter status

@JSkovgaard Oh, but i do swith to fb and yslow whenever there's a need for it, but not really a front-end dev, so, don't use it that often
(09/03/10 @ 20:51)

umbraco Certified Developer umbraco MVP 2008/2009

• RSS

RSS Feed

• blogCalendar

<March 2009>
1234567
891011121314
15161718192021
22232425262728
293031

• blogCategories

umbraco quick tip #1: umbracoUrlAlias and specifying complete new path

Posted on Sunday, March 08, 2009

Lots of people are aware of those nifty hidden gems in umbraco. And today I'll introduce another one which I came across a few days ago. It's the 'umbracoUrlAlias' property alias. It can be useful in cases where you'd like to restructure some parts of the umbraco content tree. Let's take an news section example and start from this:

-Content
--News
---2009
----4
-----8
------A news item created on March 8th

Assume your client want to keep the tree structure as is (As it makes it easy for him/her to know when posts have been created/updated, but doesn't want users who visit the site to enter the complete path /news/2009/4/8/a-news-item-created-on-martch-8-th.aspx. Instead, the user should be able to enter /news/a-news-item-created-on-march-8-th.aspx.

In this case, 'umbracoUrlAlias' migth become the programmer's best friend. All you need to do is to have an extra property of type 'textstring', and alias = 'umbracoUrlAlias'. For each of the news item, enter news/name-of-the-item (Replace name-of-the-item with the corresponding new item's node name, NO LEADIND SLASH AND DO NOT ADD THE .ASPX EXTENSION) and the news item will also be available from /news/name-of-the-item.aspx.

Ok, got it?

Let's add another example (a real life example I ran into last week) where I am dealing with profiles (Basically, people that register on the site) and projects (People can add any number of projects). Content tree had to be structured as:

-Content
--Profiles
---Profile-1
---Profile-2
----Projects
-----Project-1
----Other stuff folder
---Profile-3

and so...

In this case, 'Project-1' is available from the address /profiles/profile-2/projects/project-1.aspx whereas the client requested that a project is always available from the address /projects/project-1.aspx.

Solution: Again, add a new property of 'textstring' type, alias = 'umbracoUrlAlias' and enter projects/project-1 in the field (for project-1 that is).

Pretty neat stuff, isn't that?

And it's not finished yet. Assume 'Project-1' has a number of child nodes as in following tree structure:

-Content
--Profiles
---Profile-1
---Profile-2
----Projects
-----Project-1
------Child-1
------Child-2
----Other stuff folder
---Profile-3

Both child nodes will be available from /profiles/profile-2/projects/project-1/child-1.aspx (/profiles/profile-2/projects/project-1/child-2.aspx) as from /projects/project-1/child-1.aspx (/projects/project-1/child-1.aspx) without the need to add the property for those child nodes.

Bottom line: It doesn't matter how deep the content is stored inside umbraco, it can always be retrieved using a much more simple url/path if you're adding a 'umbracoUrlAlias' property.

Happy coding!

Best Site good looking
Posted by Djstselc on Saturday, February 27, 2010
Wonderfull great site
Posted by Auxbdenm on Saturday, February 27, 2010
Thanks funny site
Posted by Saolawpe on Saturday, February 27, 2010
Cool site goodluck :)
Posted by Eczloepy on Saturday, February 27, 2010
Thanks funny site
Posted by Pdzahjwn on Saturday, February 27, 2010
Hello good day
Posted by Rwewonht on Saturday, February 27, 2010
i'm fine good work
Posted by Whynnane on Saturday, February 27, 2010
It's funny goodluck
Posted by Gwalijok on Saturday, February 27, 2010
magic story very thanks
Posted by Vzbyvqao on Saturday, February 27, 2010
Very funny pictures
Posted by Rudymmyj on Saturday, February 27, 2010
Thanks funny site
Posted by Nxdnniin on Saturday, February 27, 2010
Gloomy tales
Posted by Lyhkrkfl on Saturday, February 27, 2010
Best Site Good Work
Posted by Jexrxhhk on Saturday, February 27, 2010
Gloomy tales
Posted by Rdcukhgd on Saturday, February 27, 2010
Very Good Site
Posted by Mtqkfhtu on Saturday, February 27, 2010
Hello good day
Posted by Ftddcfrc on Saturday, February 27, 2010
Best Site good looking
Posted by Ooseoctq on Saturday, February 27, 2010
I'm happy very good site
Posted by Sapqbidr on Saturday, February 27, 2010
It's serious
Posted by Xrzpgtjy on Saturday, February 27, 2010
This site is crazy :)
Posted by Pgxjvhlt on Saturday, February 27, 2010
this post is fantastic
Posted by Yffrlzob on Saturday, February 27, 2010
I'm happy very good site
Posted by Wgtiivhg on Saturday, February 27, 2010
this post is fantastic
Posted by Dplthxsv on Saturday, February 27, 2010
i'm fine good work
Posted by Oztetbih on Saturday, February 27, 2010
It's serious
Posted by Fshkpgxs on Saturday, February 27, 2010
Hello good day
Posted by Smonuerp on Saturday, February 27, 2010
Very funny pictures
Posted by Vwwbmjdq on Saturday, February 27, 2010
Gloomy tales
Posted by Nocyobqd on Saturday, February 27, 2010
Cool site goodluck :)
Posted by Xldbwnxl on Saturday, February 27, 2010
Thanks funny site
Posted by Wmjutxgg on Saturday, February 27, 2010
this post is fantastic
Posted by Flhrmrab on Saturday, February 27, 2010
This site is crazy :)
Posted by Zwcuhwsd on Saturday, February 27, 2010
Best Site Good Work
Posted by Qwhzcboi on Friday, February 26, 2010
I love this site
Posted by Ixqgscsd on Friday, February 26, 2010
This site is crazy :)
Posted by Ufnoozxx on Friday, February 26, 2010
It's funny goodluck
Posted by Hbhbetuo on Friday, February 26, 2010
Best Site good looking
Posted by Tyxzyrxt on Friday, February 26, 2010
very best job
Posted by Abacodss on Friday, February 26, 2010
Wonderfull great site
Posted by Zkpncftw on Friday, February 26, 2010
Wonderfull great site
Posted by Iuczoquj on Friday, February 26, 2010
I'm happy very good site
Posted by Znxwcmdr on Friday, February 26, 2010
Thanks funny site
Posted by Mdrftopy on Friday, February 26, 2010
I love this site
Posted by Jbpoptal on Friday, February 26, 2010
Very Good Site
Posted by Kpaoukcf on Friday, February 26, 2010
Very interesting tale
Posted by Gmsyodfr on Friday, February 26, 2010
Very Good Site
Posted by Vrejpsgd on Friday, February 26, 2010
This site is crazy :)
Posted by Yjuscejp on Friday, February 26, 2010
Cool site goodluck :)
Posted by Rikspbuk on Friday, February 26, 2010
Cool site goodluck :)
Posted by Gfmfdpyv on Friday, February 26, 2010
perfect design thanks
Posted by Wdztemlt on Friday, February 26, 2010
It's serious
Posted by Gkuzckah on Friday, February 26, 2010
i'm fine good work
Posted by Miuazvrl on Friday, February 26, 2010
i'm fine good work
Posted by Vhvlqgvz on Friday, February 26, 2010
Gloomy tales
Posted by Lxwiocgh on Friday, February 26, 2010
Gloomy tales
Posted by Eemsoyal on Friday, February 26, 2010
I'm happy very good site
Posted by Zwdbaunk on Friday, February 26, 2010
Thanks funny site
Posted by Retjxqsp on Friday, February 26, 2010
This site is crazy :)
Posted by Vdegsvyw on Friday, February 26, 2010
Gloomy tales
Posted by Fduucrca on Friday, February 26, 2010
Gloomy tales
Posted by Ulkivtzx on Friday, February 26, 2010
This site is crazy :)
Posted by Rraamrnu on Friday, February 26, 2010
magic story very thanks
Posted by Uqafccrr on Friday, February 26, 2010
very best job
Posted by Sszfcsks on Friday, February 26, 2010
Gloomy tales
Posted by Ebkpnqkg on Friday, February 26, 2010
Thanks funny site
Posted by Rsgxdejz on Thursday, February 25, 2010
This site is crazy :)
Posted by Asnpdcsn on Thursday, February 25, 2010
Very interesting tale
Posted by Ktmprzvw on Thursday, February 25, 2010
Cool site goodluck :)
Posted by Zutnopwu on Thursday, February 25, 2010
Gloomy tales
Posted by Dmukuixp on Thursday, February 25, 2010
very best job
Posted by Rsldfakg on Thursday, February 25, 2010
real beauty page
Posted by Wokkdoyl on Thursday, February 25, 2010
Wonderfull great site
Posted by Zilvwruc on Thursday, February 25, 2010
It's funny goodluck
Posted by Enuexmwo on Thursday, February 25, 2010
Good crew it's cool :)
Posted by Pauxbspv on Thursday, February 25, 2010
Very interesting tale
Posted by Gfsadkbt on Thursday, February 25, 2010
Best Site Good Work
Posted by Bwekmzre on Thursday, February 25, 2010
I love this site
Posted by Qnfqefgi on Thursday, February 25, 2010
This site is crazy :)
Posted by Ebichlpu on Thursday, February 25, 2010
This site is crazy :)
Posted by Ebichlpu on Thursday, February 25, 2010
It's serious
Posted by Eyhotitc on Thursday, February 25, 2010
Best Site good looking
Posted by Aescdcau on Thursday, February 25, 2010
very best job
Posted by Orxrawkm on Thursday, February 25, 2010
Jonny was here
Posted by Gobeutmr on Thursday, February 25, 2010
Excellent work, Nice Design
Posted by Komnsgva on Thursday, February 25, 2010
Hello good day
Posted by Lvesbxio on Thursday, February 25, 2010
I love this site
Posted by Nhypwzej on Thursday, February 25, 2010
real beauty page
Posted by Uuxngqmr on Thursday, February 25, 2010
Hello good day
Posted by Ctshxolx on Thursday, February 25, 2010
Hello good day
Posted by Ftngsbhz on Thursday, February 25, 2010
Hello good day
Posted by Jwhkfdiq on Thursday, February 25, 2010
very best job
Posted by Tcwzwetq on Thursday, February 25, 2010
very best job
Posted by Wbzmmvse on Thursday, February 25, 2010
Very interesting tale
Posted by Wcmhptvf on Thursday, February 25, 2010
Best Site good looking
Posted by Jnmjalci on Thursday, February 25, 2010
Wonderfull great site
Posted by Ctfskgdr on Thursday, February 25, 2010
Very interesting tale
Posted by Btrokmzr on Thursday, February 25, 2010
Jonny was here
Posted by Brjdrqpj on Thursday, February 25, 2010
Wonderfull great site
Posted by Uolawnnm on Thursday, February 25, 2010
Very funny pictures
Posted by Agqzkiqc on Thursday, February 25, 2010
perfect design thanks
Posted by Epehhlvn on Thursday, February 25, 2010
Thanks funny site
Posted by Ehiypddl on Wednesday, February 24, 2010
Thanks funny site
Posted by Ehiypddl on Wednesday, February 24, 2010
Cool site goodluck :)
Posted by Liyfcuvn on Wednesday, February 24, 2010
It's serious
Posted by Xnmktyig on Wednesday, February 24, 2010
Jonny was here
Posted by Pmiqevjb on Wednesday, February 24, 2010
It's funny goodluck
Posted by Lqjfkqav on Wednesday, February 24, 2010
Jonny was here
Posted by Xfmrjgzr on Wednesday, February 24, 2010
perfect design thanks
Posted by Ciymdeag on Wednesday, February 24, 2010
very best job
Posted by Wlmifdet on Wednesday, February 24, 2010
i'm fine good work
Posted by Isiywkzi on Wednesday, February 24, 2010
very best job
Posted by Aedditbq on Wednesday, February 24, 2010
Wonderfull great site
Posted by Pvegwrya on Wednesday, February 24, 2010
I love this site
Posted by Jtnfoenc on Wednesday, February 24, 2010
Excellent work, Nice Design
Posted by Oniydmhx on Wednesday, February 24, 2010
Cool site goodluck :)
Posted by Rvyvclfo on Wednesday, February 24, 2010
Excellent work, Nice Design
Posted by Qlebbwxc on Wednesday, February 24, 2010
Cool site goodluck :)
Posted by Rvyvclfo on Wednesday, February 24, 2010
Cool site goodluck :)
Posted by Rvyvclfo on Wednesday, February 24, 2010
Good crew it's cool :)
Posted by Qrozveuy on Wednesday, February 24, 2010
i'm fine good work
Posted by Scmegjdl on Wednesday, February 24, 2010
I love this site
Posted by Rivhnelk on Tuesday, February 23, 2010
I love this site
Posted by Rivhnelk on Tuesday, February 23, 2010
very best job
Posted by Jrvnzayj on Tuesday, February 23, 2010
Hello good day
Posted by Bqkidcpy on Tuesday, February 23, 2010
good material thanks
Posted by Fbkiiowf on Tuesday, February 23, 2010
It's serious
Posted by Dsfpghfn on Tuesday, February 23, 2010
Good crew it's cool :)
Posted by Plibbdtz on Tuesday, February 23, 2010
Hello good day
Posted by Yoffxiyj on Tuesday, February 23, 2010
Punk not dead
Posted by Mtsqxepo on Tuesday, February 23, 2010
I'm happy very good site
Posted by Jqsgtbrj on Tuesday, February 23, 2010
i'm fine good work
Posted by Jmienayw on Tuesday, February 23, 2010
I love this site
Posted by Xygowhjz on Tuesday, February 23, 2010
Excellent work, Nice Design
Posted by Geoqkodx on Tuesday, February 23, 2010
Thanks funny site
Posted by Jzomtwai on Tuesday, February 23, 2010
very best job
Posted by Evevrope on Tuesday, February 23, 2010
very best job
Posted by Egavlfpo on Tuesday, February 23, 2010
Hello good day
Posted by Sujkagza on Tuesday, February 23, 2010
Hello good day
Posted by Lpikdoqu on Tuesday, February 23, 2010
It's serious
Posted by Vknvpguf on Tuesday, February 23, 2010
Hello good day
Posted by Wvhmowkb on Tuesday, February 23, 2010
I'm happy very good site
Posted by Hfznngfi on Tuesday, February 23, 2010
this post is fantastic
Posted by Wskavboy on Tuesday, February 23, 2010
Very funny pictures
Posted by Faasnmvh on Tuesday, February 23, 2010
Very funny pictures
Posted by Xeajeoqf on Tuesday, February 23, 2010
real beauty page
Posted by Wdbpjill on Tuesday, February 23, 2010
Excellent work, Nice Design
Posted by Omhezhco on Tuesday, February 23, 2010
Excellent work, Nice Design
Posted by Txoktvgi on Tuesday, February 23, 2010
It's funny goodluck
Posted by Mpkxnsdp on Tuesday, February 23, 2010
I'm happy very good site
Posted by Qwjlfbpo on Tuesday, February 23, 2010
Best Site Good Work
Posted by Pahgmuwf on Tuesday, February 23, 2010
Best Site Good Work
Posted by Ptpdyotr on Tuesday, February 23, 2010
Excellent work, Nice Design
Posted by Zrwmogoi on Monday, February 22, 2010
Best Site good looking
Posted by Vqbergzk on Monday, February 22, 2010
Gloomy tales
Posted by Frxinnij on Monday, February 22, 2010
Wonderfull great site
Posted by Thihmrdf on Monday, February 22, 2010
Wonderfull great site
Posted by Thihmrdf on Monday, February 22, 2010
Hello good day
Posted by Gsdiadhn on Monday, February 22, 2010
I'm happy very good site
Posted by Hczdussr on Monday, February 22, 2010
Gloomy tales
Posted by Nbfkgyop on Monday, February 22, 2010
very best job
Posted by Kyltxbjf on Monday, February 22, 2010
very best job
Posted by Odsscgxh on Monday, February 22, 2010
Wonderfull great site
Posted by Mojaheki on Monday, February 22, 2010
It's funny goodluck
Posted by Iojhrgtn on Monday, February 22, 2010
Good crew it's cool :)
Posted by Pizbhvre on Monday, February 22, 2010
very best job
Posted by Ugxefenx on Monday, February 22, 2010
Jonny was here
Posted by Ljmeyiwl on Monday, February 22, 2010
Jonny was here
Posted by Iuifnjad on Monday, February 22, 2010
very best job
Posted by Jrixmiqd on Monday, February 22, 2010
magic story very thanks
Posted by Movmhklp on Monday, February 22, 2010
Cool site goodluck :)
Posted by Zuuymebl on Monday, February 22, 2010
Very Good Site
Posted by Nxfkcxpt on Monday, February 22, 2010
Best Site Good Work
Posted by Hwnncuwx on Monday, February 22, 2010
Thanks funny site
Posted by Xhusucge on Monday, February 22, 2010
It's funny goodluck
Posted by Hfqwgeoh on Monday, February 22, 2010
Excellent work, Nice Design
Posted by Mnwdrstc on Monday, February 22, 2010
Excellent work, Nice Design
Posted by Gfklzcyy on Monday, February 22, 2010
Very interesting tale
Posted by Cgaywawl on Monday, February 22, 2010
good material thanks
Posted by Vuoyzdzq on Monday, February 22, 2010
magic story very thanks
Posted by Dunbhegn on Monday, February 22, 2010
Excellent work, Nice Design
Posted by Vyhwaydw on Monday, February 22, 2010
It's funny goodluck
Posted by Uktygnwo on Monday, February 22, 2010
Very interesting tale
Posted by Tsrtsxos on Monday, February 22, 2010
Best Site good looking
Posted by Wzvilclz on Monday, February 22, 2010
This site is crazy :)
Posted by Bgrdjpor on Monday, February 22, 2010
This site is crazy :)
Posted by Wzomblzt on Monday, February 22, 2010
magic story very thanks
Posted by Tvcptwkr on Monday, February 22, 2010
Cool site goodluck :)
Posted by Mphajdlh on Monday, February 22, 2010
It's funny goodluck
Posted by Tubfetij on Monday, February 22, 2010
This site is crazy :)
Posted by Qfvpkywq on Sunday, February 21, 2010
i'm fine good work
Posted by Ybgpumyx on Sunday, February 21, 2010
Punk not dead
Posted by Kbfxqhnu on Sunday, February 21, 2010
Very Good Site
Posted by Zmcbskcs on Sunday, February 21, 2010
very best job
Posted by Tycapamh on Sunday, February 21, 2010
this is be cool 8)
Posted by Aevsxusd on Sunday, February 21, 2010
magic story very thanks
Posted by Shrcktqc on Sunday, February 21, 2010
I'm happy very good site
Posted by Viwtyrky on Sunday, February 21, 2010
good material thanks
Posted by Ghestudg on Sunday, February 21, 2010
I love this site
Posted by Ewlngavs on Sunday, February 21, 2010
It's serious
Posted by Fegnjgdf on Sunday, February 21, 2010
Best Site good looking
Posted by Fcgxgtaz on Sunday, February 21, 2010
very best job
Posted by Rumkeeox on Sunday, February 21, 2010
I'm happy very good site
Posted by Aqzfeoko on Sunday, February 21, 2010
Hello good day
Posted by Xaogwaqa on Sunday, February 21, 2010
Very Good Site
Posted by Plxhdhqh on Sunday, February 21, 2010
Best Site good looking
Posted by Cjelladz on Sunday, February 21, 2010
Good crew it's cool :)
Posted by Erirtjpn on Sunday, February 21, 2010
Excellent work, Nice Design
Posted by Pyxxxgxq on Sunday, February 21, 2010
good material thanks
Posted by Pexxnpnu on Sunday, February 21, 2010
Excellent work, Nice Design
Posted by Grjacadp on Sunday, February 21, 2010
Good crew it's cool :)
Posted by Grbeyeyb on Saturday, February 20, 2010
Gloomy tales
Posted by Qdcjpmtd on Saturday, February 20, 2010
It's serious
Posted by Xvtpfqcu on Saturday, February 20, 2010
Very funny pictures
Posted by Iaypwylu on Saturday, February 20, 2010
real beauty page
Posted by Wkhhvmko on Saturday, February 20, 2010
this post is fantastic
Posted by Dcdohbkr on Saturday, February 20, 2010
Best Site Good Work
Posted by Yxyefjls on Saturday, February 20, 2010
Good crew it's cool :)
Posted by Kqrtekem on Saturday, February 20, 2010
very best job
Posted by Riqvokga on Saturday, February 20, 2010
Hello good day
Posted by Uyzavsgs on Saturday, February 20, 2010
good material thanks
Posted by Nbnebzrh on Saturday, February 20, 2010
real beauty page
Posted by Bvsojsir on Saturday, February 20, 2010
Best Site good looking
Posted by Xnzmnaxk on Saturday, February 20, 2010
I love this site
Posted by Mrobwvuo on Saturday, February 20, 2010
Hello good day
Posted by Jfcezdlw on Saturday, February 20, 2010
It's serious
Posted by Xauetrvu on Saturday, February 20, 2010
Jonny was here
Posted by Pcmznfic on Saturday, February 20, 2010
I'm happy very good site
Posted by Wdomnsmy on Saturday, February 20, 2010
I'm happy very good site
Posted by Wdomnsmy on Saturday, February 20, 2010
I'm happy very good site
Posted by Wdomnsmy on Saturday, February 20, 2010
zfcHrlB
Posted by cWIcOP on Wednesday, February 17, 2010
LY0l8K http://fh82nGsQk0fQsn3Ldap1f.com
Posted by albert on Thursday, January 07, 2010
KNQIEv http://cry82Nqp94NsW0sl2VvqhJ4m.com
Posted by tomphson on Wednesday, January 06, 2010
Gloomy tales
Posted by Voqmstwo on Friday, December 25, 2009
Thanks funny site
Posted by Kpecmjxi on Thursday, November 19, 2009
perfect design thanks
Posted by Nqvlprny on Friday, October 30, 2009
e99SdE http://mMs93Hfppskd6wngIosSu.net
Posted by tonny on Saturday, October 17, 2009
Really useful thanks :)

Any idea if it's possible to do the opposite and clear the "Link to document" setting within an event handler, so as prevent some documents from even having a url ?
Posted by Hendy on Saturday, July 18, 2009
1/ Good point, I did not have that requirement though. I should look into that. Did it once for media items, guess it must be possible for content items as well.

2/ Have never been that worried about this, and it seems it's no longer an issue. Again, thanks for pointing that out as well.

Cheers,
Dirk
Posted by Dirk on Sunday, March 08, 2009
umbracoUrlName is brilliant, but has several major issues:

1) You can't use the "alternate" Url in TinyMCE, unless you type it in manually.

2) You risk running into duplicate content issues when it comes to Google indexing your site (solution hint: use the new canonical meta tag).
Posted by Soeren Sprogoe on Sunday, March 08, 2009

Leave a comment