开发者

Using Umbraco search with tags

开发者 https://www.devze.com 2022-12-15 11:03 出处:网络
I have setup umbraco search xslt package. In my xslt I am searching by pagename, title, description and now, tags.

I have setup umbraco search xslt package. In my xslt I am searching by pagename, title, description and now, tags.

The tags property is a document type property of the type, 'Tags'. The search xslt is below;

<xsl:variable name="searchFields" select="ps:getListParameter(string开发者_运维问答(//macro/searchFields), '@pageName, title, description, tags')"/>

How come searching by tags doesn't work?


You say the document has a property of type "Tags" but you have listed the parameters as "tags". Remember that XSLT is case sensitive.

Also, I don't have Umbraco open in front of me but does the XSLT search not reference the property "alias" rather than the property type?


XSLTSearch will split the searchfield by the comma, but it does not trim the aliases after that, so you are searching in the " tags" field (not the extra first space). If you remove the spaces, you should be fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号