URL Page Alias with wild card

David Pearson asked on November 30, 2017 22:02

I have a page that uses Alias to filter content by Category.

I have the set up as follow: Patterm: /Inspiration/{TagName} Alias Redirect: use site setting default

This works on my local computer. If I click a filter like stories on the /inspiration page it takes me to /inspiration/stories in the browser url listing. It stays on the /inspiration but filters only stories pages.

This is not working on my Sys server. Is there a setting in the Sys Kentico i am missing?

Thanks David

Recent Answers


David Pearson answered on November 30, 2017 23:11

Update: I was able to duplicate the issue with Sys when I turn on Enable web analytics for the site on the stories folder, the alias stop working. The page stays on Inspiration with tagname = stories.

Is this a bug? No issues on my other site that is Kentico 9. This site is Kentico 10.0.34..

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on November 30, 2017 23:35

Another update. I added a non-exist path to the URL to get it work.
Orignal with Web analytic off the Alias work (/inspiration/{tagname})

The old path was inspiration/style. This keep going to the menu item style page with web analytic turn on.

The current fix was to add "tag" to the url inspiration/tag/stories with new alias (/inspiration/tag/{tagname}) This stays on the inspiration page to allow filtering of a list.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 1, 2017 14:38

When you say it doesn't work, can you clarify that a bit more?

  • Are you getting an error?
  • Is it displaying something else?
  • Not directing to the proper URL?
  • Getting any results?

Have you attempted to use the SQL and Macro debug to see what is being sent and rendered by the system processes? Can you provide a few real examples of the URLs?

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on December 1, 2017 14:55

Hi Brenden,

  • No errors
  • It is going to the node below Inspiration.
  • Yes it was not directing to expected URL.
  • Unexpected results

Have not try the SQL / Macro debug yet...

Here is an example of what I am doing If I have a list of article collections under a folder call inspiration in the Navigation tree.

inspiration - Design - Stories - Galleries - Videos

The top of the Article List control has a filter on the Inspiration Page that allows the user to filter in on a type of article.

The filter works using page alias in Kentico. Example example.com/inspiration/design to get all design articles in the list on the Inspiration page. Using inspiration/{tagname} alias. The url in the browser will show inspiration/design. The code behind on the list will look for tagname = design to do the filtering.

This work until I turn on Enable Web analytics. Turning the Web Analytics back off did not return the function above.

My work around was to add an additional path (“tag”) that does not exist in Kentico to the alias to hook things up to. inspiration/tag/{tagname}

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on December 1, 2017 14:58

Inspiration * Design * Stories * Galleries * Videos

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 1, 2017 15:17

So your structure is like this?

/Inspiration
/Inspiration/Design
/Inspiration/Stories
/Inspiration/Galleries
/Inspiration/Videos

Typically with this kind of setup we don't need the wildcard url because you already the physical pages setup. You'd just filter your content by the path or category name. Similar to how you mentioned you already have it set up.

My guess is there is something fishy with how you have the alias in place on the /inspiration page and your sub pages. Can you send a screen shot of your URL property page on the /inspiration page and a screenshot of your content tree for the /inspiration and child pages?

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on December 1, 2017 15:46

Here is a screen shot. This works with Enable Web Analytics turn off. Once I turn Web Analytics on, this does not work anymore.

inpiration/stories will load the inspiration page with the all the article under stories showing.

Image Text

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 1, 2017 16:11

Although you have tested with analytics on and off, I believe the issue is with your configuration. What do your URLs for the child pages of /Inspiration look like? You can find it on the General tab of the page.

My guess is you're running into a URL conflict/clash and it's causing things to break.

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on December 1, 2017 17:29

it is: /inspiration/stories, /inspiration/galleries, /inspiration/styles and /inspiration/videos

I wonder why it did not crash with /Inspiration/{TagName} until after you first turn analytics on. If you turn analytics back off after that first turn on it remains broke.

Should it work with just /Inspiration/{TagName}? I am now using inspiration/tag/{tagname} for the filtering.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 1, 2017 20:22 (last edited on December 1, 2017 20:23)

Tell me more about your filter and how it's setup. As I mentioned you don't really need the wildcard URL because your page structure already has the "filters" built in. Set your path in the webpart to ./% and it will get everything below the current directory. You could also create a custom setup with a dropdown that gets all your "categories" by using a custom query and displaying them via a repeater.

But I still believe you're running in to URL clashes which is the main problem not web analytics.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.