You are here:  » normalize and the backslash


normalize and the backslash

Submitted by xlot on Sun, 2006-08-27 14:25 in

Hello David,

Thanks again for your help in my last post. Got another hopefully just as easy question for you.

I have many categories being imported that have something like this.

Games/Toys

I have added a filter to replace the "/" with " "

That seems to have no effect, can you think of a way to replace the / with a space or charecter that will work in a url, in the tapestry_normalise function?

Thanks again david

Submitted by support on Sun, 2006-08-27 14:49

Hi,

The normalise function takes place before the filters; so I think (as you have probably discovered) the category is imported as "GamesToys".

It is quite simple to modify includes/tapestry.php to apply the user filters before normalisation. Look for the following comments in the code (starting at line 156 in the distribution):

<?php
  
/* apply standard filters */
  
.. standard filter code ..
  
/* apply user filters */
  
.. user filter code ..
?>

If you simply swap those two blocks of code around; the user filters will then be applied first and you will be able to search and replace the "/" character with a space.

Cheers,
David.