3

we had a couple of requirements with regards to link management on the site, one of which was to rid the site of web page file extensions (no page or link should have a .aspx or other extension) how to achieve this using dynamic linking??

7

It would be good if you could supplement your question with what you have tried and what research you have done so far!

Will Price has excellent posts on Tridion Developer site related to this here:

In essence, there are two parts to this:

  1. Ensuring that URLs without a filename or extension (e.g. http://your-url/news/) work on your Application Server (e.g. IIS), and
  2. Getting the Tridion Dynamic Linking functionality to generate URLs without the filename and extension also.

The first of these can be handled through a combinations of: Only having a single Page per Structure Group, default page extensions (e.g. default.aspx / index.html) and/or URL rewrites.

The second of these involves changing the default Dynamic Linking behaviour. This is where Will's posts will help.

| improve this answer | |
  • I'll mention the same as I offered to Nick's suggestion. A single page per SG would work, but the OP should consider the cost for new pages, maintenance, troubleshooting, and compliance. Author's probably won't volunteer to do this and having every filename as index.aspx probably isn't much fun either. :-) – Alvin Reyes Nov 15 '13 at 5:54
6

As Will's articles suggest, using a custom Tag Renderer is one way to do this. It's a clean approach, but does require advanced CMS knowledge and programming skill to implement.

A really really simple approach is to create each Page within its own SG with "index.aspx" or "default.aspx" being the page filename, hence relying on the dafault.aspx/index page functionality within IIS. So the SG URL becomes the extensionless Url. The big advantage with this approach is its simplicity.

The downside with this approach is that the editors have to create an SG for every new page. However, this can be automated with a little help from the Event System.

| improve this answer | |
  • For .Net based website, I think this is one of the best way to do this. – Pankaj Gaur Nov 10 '13 at 17:50
  • Even with the Event System, having IIS/web server feature dictate all Pages must have a 1:1 relationship with Structure Groups is a bit of "technical debt" in my perspective. I'm pretty sure a URL rewrite or similar approach would be more practical (following Nuno's "how would you do it without Tridion" thinking). – Alvin Reyes Nov 15 '13 at 5:49
  • 1
    Also remember that if you go for using SGs with index.aspx pages and you're using dynamic linking then the URLs returned from component links will still be the full page URLs including the /index.aspx – David Forster Nov 15 '13 at 10:45
3

If it is a .NET enabled website then what Nick has suggested is the the best way to achieve an extension less URL, in addition to it, you may also use IIS URL Rewriting in conjunction with HTTP Module to handle more manipulations in the URL and generating URLs based on Business Logic.

If it is a Java enabled website then you may simply write rules to achieve this

If you do not want to handle it on Presentation server side, but on the Tridion side then follow the cleanest approach suggested by Will.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.