Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tommy Pedersen 15 posts 65 karma points
    Aug 27, 2013 @ 10:50
    Tommy Pedersen
    0

    multilanguage search

    Hey there again.. is it possible to adjust the search bar/engine in the v3.2.0 starter kit to just search on specific countries. if im under the myexamplesite.com/uk it search for related content under the /uk section only and if under the myexamplesite.com/da section it only finds the /da content? my site structure can be see here under.

    enter image description here

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 28, 2013 @ 09:33
    Rune Grønkjær
    0

    Yes it is. It's just standard Umbraco examine setup. Read more about that here:

    http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx

    All you need to do is to figure out how to change the Searcher depending on which language you are on. But as this is all about changing a string in the razor, that should be done quite easy :)

    /Rune

  • Tommy Pedersen 15 posts 65 karma points
    Aug 29, 2013 @ 11:16
    Tommy Pedersen
    0

    i've checked that site out, and got my search working more properly but can't seem to figure out which string I need to manipulate depending on language

  • Tommy Pedersen 15 posts 65 karma points
    Sep 03, 2013 @ 02:05
    Tommy Pedersen
    0

    stil need solution for this =S

  • Tommy Pedersen 15 posts 65 karma points
    Sep 03, 2013 @ 08:43
    Tommy Pedersen
    0

    Solution found. =)

    Original line

    IEnumerable<DynamicNode> allProducts = allNodeResults.Where( p => p.NodeTypeAlias == ProductTypeName );
    

    Solution line:

    IEnumerable<DynamicNode> allProducts = allNodeResults.Where( p => p.NodeTypeAlias == ProductTypeName && p.Path.Split(',')[2] == currentPage.Path.Split(',')[2] );
    
  • giuseppe 9 posts 66 karma points
    Oct 27, 2013 @ 18:18
    giuseppe
    0

    Here is another solution

    IEnumerable<DynamicNode> allProducts = allNodeResults.Where( p => p.NodeTypeAlias==ProductTypeName && p.AncestorOrSelf("Lang").Name == currentPage.AncestorOrSelf("Lang").Name );
Please Sign in or register to post replies

Write your reply to:

Draft