You are here:  » Can't get filters to work


Can't get filters to work

Submitted by dthardy on Fri, 2006-07-21 03:03 in

I am importing a buy.com xml file. The category field is in the following format: "Books > History - American"

I am trying to just register "History" as the category. I have looked at every forum post to do with filtering but can't find the combination in the site admin/feed registration/ filter setup to make this work. Any help or suggestions?

Thank you.

Submitted by support on Fri, 2006-07-21 04:44

Hi,

You would be able to do this using the "Split Before" and "Split After" technique using filters that aren't in the distribution. The code is in the following thread:

http://www.pricetapestry.com/node/339

To add the new filters, add the code from that thread into includes/filter.php

Then, provided that the format is consistent you could register (in this order):

1) Split Before, Text = ">" (without the quotes)
2) Split After, Text = "-" (without the quotes)
3) Trim

Cheers,
David.