Wildcard Module
allows us to work with Dynamic URL and Sitecore wildcard items.
Problem: In Sitecore instance, Wildcard
module was working for a page when we initially configured for the first time.
When we deleted that page and recreated that page again, wildcard module was
not working. And it was not working for the newly created page in Sitecore. In
Code-behind, it was not able to match the tokens in the particular URL.
Solution: In Sitecore \System\Modules\Wildcards\Routes\<BlogRoute>,
we need to add items to create the
rule for wildcard replacement. In that, we will be adding the pages to which
wildcard to apply.
When we add
pages to Data Items, wildcard module will replace with tokens only to pages
which match this Items Collection (GUIDs). So in order to use this wildcard
route in other page or newly created page, we need to add the page explicitly
in this data items as shown in below diagram.
By doing
this, Sitecore Wildcard module started to work for newly created page.
For every
newly created page, we cannot add the page to this Item collection automatically. If
someone finds the solution to resolve this issue, it would be a great help. !!!
No comments:
Post a Comment