Copied to clipboard

Flag this post as spam?

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


  • Martin Lingstuyl 202 posts 379 karma points
    Dec 09, 2010 @ 13:40
    Martin Lingstuyl
    0

    Passing Multiple Properties

    Hi,

    I've got another question now. Your plugin works as desired, but it does not accept multiple Umbraco Page items.

    For example:

    <umbraco:Macro Search="[#value1],[#value2]" .... does not pass the second value.

    <umbraco:Macro Search="[#value1]" .... does work.

     

    Martin

  • Martin Lingstuyl 202 posts 379 karma points
    Dec 09, 2010 @ 13:52
    Martin Lingstuyl
    0

    Ah, I just read that that is actually a test.

    If value1 is empty it moves on to value2. It's umbraco's way of dealing with possibly empty values.

     

    I wonder if it would be possible to build in an addional search string that gets added up to the first?

    Hope to hear from you.

     

    Martin

  • Jonathan Cohen 40 posts 115 karma points
    Dec 10, 2010 @ 08:20
    Jonathan Cohen
    0

    Hi Martin,

    As you  noticed that is the way Umbraco handles it.

    If you describe what you are thinking of doing, where the page properties come from etc, and the result you like to get out of it, I will try to think of a solution or if there are any other forum users that have good ideas please respond.

    Just taken a solution out of the blue, a syntax like this could if the package owner handles it be a solution?
    The ode is that {} tells it is a special value and evaluets the result to a string, concatinatig the page props.

    <umbraco:Macro Search="{[#value1],[#value2]}" 
    evaluates to "pagevalue1,pagevalue2"

    <umbraco:Macro Search="{[#value1] or [$value2] + ([@value3])}"
    evaluates to "pagevalue1 or recurivevalue2 + (requestvalue3)"

    I am not sure this is the best solution or if there are any similar built in already in umbraco, need to think a bit and see if there are any respons on this

    Jonathan

     

     

  • Martin Lingstuyl 202 posts 379 karma points
    Dec 10, 2010 @ 13:25
    Martin Lingstuyl
    0

    That sounds like a great solution.

    I don't think there's a solution available in the current umbraco structure. but I might be missing something. hope someone else can correct us if thats the case.

    In the meantime it would indeed be possible to build this functionality inside the usercontrol.

     

    Be hearing from you.

    martin

  • Jonathan Cohen 40 posts 115 karma points
    Dec 28, 2010 @ 16:18
    Jonathan Cohen
    0

    Hi Martin,

    I have done a release with this on the "search parameter" on the "search plugin" it handles [#Page], [$Recursive], [@QueryString] and  [%Cookie] parameters, also text and whatever you wright in, it replacese the above woth the matching param and concatinate the hole thing.

    Hope it works as you expect.

    (The code should now work on both 3.5 and 4.0 builds)

    /Jonathan

     

Please Sign in or register to post replies

Write your reply to:

Draft