Warmtoast.comRexx and PPWizard

Simplified #DefineRexx IMPORT_RECORD_FILTER

Rexx and PPWizardPPWizard (PPW) is used to make all the pages of Warmtoast. This is my 2nd site made using PPW and my code has changed quite a bit.

The directory index pages for this site (e.g. Rexx and PPWizard, Opera etc) are filtered using:

 
#DefineRexx IMPORT_RECORD_FILTER

Basically, all unneeded categories are dropped from the database so that a list can be made of the remaining (needed) categories' posts.

My 1st attempt at this was the following:

 
#DefineRexx IMPORT_RECORD_FILTER
select
    when Column.2 = "My Category 1" then
        Remove="My Category 1"
    when Column.2 = "My Category 2" then
        Remove="My Category 2"
    when Column.2 = "My Category 3" then
        Remove="My Category 3"
(and so on...)
otherwise
    end
#DefineRexx

The above code was a right ol' pain in the bum as I had to change multiple lines each time I used it in a different directory or added a new category.

The new code I came up with for Warmtoast is this:

 
#DefineRexx IMPORT_RECORD_FILTER
select
    when Column.2 <> "My Category 1" then
        Remove = "My Category 1 filter"
otherwise
    end
#DefineRexx

Everything but the needed category is dropped without my having to list all the other categories.

Related internet links

Share this page on: Twitter | Facebook | Google+

Warmtoast.com information