Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a site with some landing pages organised in a folder at the same level as the root i.e.
home-- page-- pagelanding pages-- landing page-- landing page
When searching the site I would like to search these landing pages as well as the home and pages under it.
I think I'd need to modify the param when it calls the search template but I'm not exactly sure how. Can anyone help.
From your sample content tree it appears you want to search all the content in your site no matter where it exists. If that's the case, you can edit the XSLTsearch template (or whatever template your search page uses to display the search results) and specify the source node in the XSLTsearch macro to be "-1", which means search everything.
hmm the source is set to -1 but it isn't showing the landing pages in the results.
I believe I have fixed the problem, thus far it seems to work. I changed the code for the number($source)= -1 or number($source)= 0 when to this.
<xsl:when test="number($source)= -1 or number($source)= 0"><!-- using ALL nodes --><xsl:call-template name="search"> <!-- searches absolutely all pages (useful if you want to search multiple sites at once, or if you do not have all your content pages below a common homepage node in the content tree)--> <xsl:with-param name="items" select="umbraco.library:GetXmlAll()/* [@isDoc and @level = 1]"/></xsl:call-template></xsl:when>
I think this may be a bug. As I understand it $currentPage/ancestor-or-self::* [@level = '1'] which it originally was will climb the tree from the current page and get it's level 1 ancestor but it wont get that page's siblings.
Somehow the High five! function is broken. So here it is: Suzyb, High five! This was the solution.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted