You are here:  » Dropping last column in categories using Explode filter

Support Forum



Dropping last column in categories using Explode filter

Submitted by Convergence on Tue, 2012-05-22 15:58 in

Greetings,

Have ONE big merchant that likes to add color as their last variable/column in their category structure.

Example:

cat1>subcat1>color
cat1>subcat1>subcat2>color
cat1>subcat1>subcat2>color1,color2
cat1>subcat1>subcat2>color1/color2

Would like to filter out / drop 'color' after the last '>' delimiter.

Product color is always last.

Possible?

Thank you!

Submitted by support on Tue, 2012-05-22 16:01

Hi,

The Explode filter supports a negative Return Index value which returns the -n'th item, so -1 returns the last item, -2 will return the second to last which should work in this case!

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Tue, 2012-05-22 16:06

Hi David,

Thanks for the clarification. Will give that a go.

Thanks, again!