Copied to clipboard

Flag this post as spam?

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


  • Casper Andersen 126 posts 508 karma points
    Jun 30, 2015 @ 08:09
    Casper Andersen
    0

    Umbraco 7.2.6 Multinode treepicker

    Hello dev team

    I was using uWebshops own custom property that allows the user to select both categories and products to be added as a discount type. But for some reason they overwrite the values such as max allowed items and so on. So i decided to go with the Multinode treepicker instead, in the Allow items of type, it says in the description field to seperate with commas, but the 3 things i needed where these 3

    uwbsCategory, uwbsProduct, uwbsProductVariant

    but it did not work unless i removed the spaces so it looked like this

    uwbsCategory,uwbsProduct,uwbsProductVariant

    Im not 100% sure if this is a bug or not, but if it is inteded to work like this, could you guys please add it in the description field not no spaces after commas are allowed.

    If it is a bug, i am guessing you are grabbing the string and splitting it at the commas and then using something like a foreach loop to loop through each string.

    Might i suggest using his approach instead which filters our white space.

    theString.Split(',').Select(x => x.Trim()).Where(x => !string.IsNullOrWhiteSpace(x)).ToArray();
    

    Casper

Please Sign in or register to post replies

Write your reply to:

Draft