Hi
I'm developing a CMS 5 solution which uses a 3.party search engine. The site uses Friendly Urls. Page references are stored as /templates/Public/Pages/Page.aspx?id=123 in the search engine.We don’t want to store Friendly Urls in the search engine as we want to avoid massive re-indexing when moving pages or changing url-segments. The search engine has its own compiled code and frontend. So I'm not able to process any code to change these links.
The problem is that links like /templates/Public/Pages/Page.aspx?id=123 doesn’t work. The correct template is displayed but the CurrentPage is set to start page and not Page 123.
Have I done anything wrong with my configuration? If not is it possible to enable Friendly Urls and also use old type links without adding a handler for this in the rewriter?
Hi!
When you work with links in the code that will appear in html you should not have to think about if the url rewrite module is installed or not. As long as the links appear as html they will be rewritten to furl links. How are these links appearing on the page for the search module?
Let me simplify my question.
My CMS 5 site uses Frienly Urls. The site must also support entering links like /templates/Public/Pages/Page.aspx?id=123 in the browsers address field.
The correct template is displayed but the CurrentPage is set to start page and not Page 123. Why's that?
Hi!
As we do not support the id parameter when using the friendlyUrlProvider the solution is to use the CustomPageLink page extension. I was pretty sure that I wrote some sample code for this for the SDK but I can't find it so I'll try to make sure that we add that. Here's some sample code that shows how this can be implemented:
1. Create a base template for the pages where you want to allow this:
public CustomPageLinkTemplate(): base(CustomPageLink.OptionFlag, 0)
{
public override void ValidatePageTemplate()
{
return;
}
}
Create the links that you don't want to have furled like this:
/test.aspx?custompageid=4