嵌套通配符来处理Sitecore的虚拟物品 [英] Nested Wildcards to Handle Virtual Items in Sitecore

查看:162
本文介绍了嵌套通配符来处理Sitecore的虚拟物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TLDR;什么是多层次复杂的虚拟物品最好的工作或推荐的方法是什么?

TLDR; What is the best or recommended way to work with complex virtual items at multiple levels?

我工作的事情目前是不是使用查询字符串变量过滤性能,我只是想延长网址,并允许这些URL过滤结果
事件:结果
〜/事件/ 2012 /月或结果
〜/事件/午餐或结果
〜/事件/ 6CB27D08-358E-49AA -8107-16A50E963C70

I'm working on something currently that instead of using query string variables to filter properties, I would just like to extend the URL and allow those URLs to filter.
Events:
~/events/2012/april or
~/events/lunches or
~/events/6CB27D08-358E-49AA-8107-16A50E963C70

我现在有一个通配符设置处理最后一种情况或一年,但跑进一个通配符的唯一障碍处理一个层次,所以我无法处理 /事件/ {0} / {1} 只有一个通配符。更进一步,我认为,共同友好的URL将结束是 /事件/ 2012 /月/< EXTERNAL_ID> _< EVENT_NAME>

I currently have a wildcard setup to handle the last case or the year but ran into the snag of a wildcard only handling one level so I'm unable to handle /events/{0}/{1} with just one wildcard. Further more, I believe that the common friendly url would end up being /events/2012/april/<external_id>_<event_name>

使用通配符,我需要把他们深深的三层三种不同的布局,从我目前知道处理每种情况下

Using wildcards, I would need to put them three layers deep with three different layouts to handle each case from what I know currently

Events/
        *
          *
            *

有没有更好的方法或处理多层次复杂的虚拟物品一个比较推荐的方式?

Is there a better way or a more recommended way to deal with complex virtual items at multiple levels?

推荐答案

您正在这里的正确的路径,你在说正确的,你需要一个通配符项为URL的每个部分。然而,仅仅因为一个通配符的存在并不意味着你需要使用它。换句话说,在 /事件/ * / * 项目将处理 /事件/ 2012 /月 URL

You are on the correct path here and you are correct in that you would need a wildcard item for each segment of the URL. However, just because a wildcard exists doesn't mean you need to use it. In other words, the /events/*/* item would handle the /events/2012/april URL.

您可能想看看这个博客帖子的 http://www.sitecore.net/Community/Technical-Blogs/Getting-to-Know-Sitecore/帖子/ 2011/09 /通配符和 - 数据驱动 - URLs.aspx 通向通配符模块

You may want to look at this blog post http://www.sitecore.net/Community/Technical-Blogs/Getting-to-Know-Sitecore/Posts/2011/09/Wildcards-and-Data-Driven-URLs.aspx that leads to the Wildcard Module

这篇关于嵌套通配符来处理Sitecore的虚拟物品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆