Hi Dave,
I have been busy updating few minor issues with my web site. I have manged to get rid off lot of minor issues but, I am not knowledgeable enough to modify one last minor issue.
Now problem is, some of the feeds I get, have either multiple category, or have sub-categories separated by either > sign or comma or pipe. For example:
Television > LCD TV
or
Televicion, LCD TV
or even
Television | LCD TV
Now is there way create a global filter to be used for this purpose. What I mean is, If we can create a filter to read up to the first separator sign (i.e first > symbol) then keep everything up to that point and delete the rest. Obviously, creating a global filter means this can be used in other scenarios as well.
Can you help?
Noor
Hi Dave,
Sorry, your guide is bit short cut. Following an instruction is not best assert. Could you pleas explain bit more how I can do this using explode function? One of the feed has follonwing category structure:
Category: electronic > television > LCD tv
So using the example above, I only want to keep television
part of it and get rid of the rest.
Noor
Hello Noor,
Sorry, in this specific example, adding an Explode filter using
Explode Character or String:
>
Return Index:
1
...that will return "television" (return index is zero based). However, bear in mind that this will require that all all category values have a suitable value as the second item. If that's not the case let me know and a simple mod to the filter perhaps would be to check if a value exists and decrement return index until a value is found...
Cheers,
David.
--
PriceTapestry.com
Am I right to call this as
String Vale = >
Return Value = 2
makes it LCD TV using above example?
Noor
Hello Noor,
The Explode filter will do exactly what you want. You enter the character on which to split the text up by and a return index value, most likely either 0 for the first item (main category) or if you wanted to -1 would return the last value...
Cheers,
David.
--
PriceTapestry.com