New Message: Re: Override File Extension for One Page on Static Render

webmaster at userland.com webmaster at userland.com
Wed Jul 21 17:40:42 PDT 2004


A new message was posted:

Address: http://manila.userland.com/discuss/msgReader$500

By: Alan German (asg at erols.com)

Hi David.

I figured it out. You'll _love_ this.

The only time setting pta^.fileExtension has an affect on the filename is in firstFilter. That's because buildObject computes pta^.fname using fileExtension soon after calling firstFilter, before calling the other filter scripts.

The reason my attempts at using firstFilter didn't work is that I was testing for a pta^.flag that I set with a custom Manila macro that's in the body of the Manila page.

pta^.flag cannot exist at firstFilter time, since the page hasn't been rendered (executing the macro). Doh! The test would fail, never setting pta^.fileExtension.

So, I'm going to keep my flag-setting macro, and move the work to finalFilter, where I can test for the flag, and I'll have to rewrite pta^.fname and pta^.f (just in case), since it's too late to change fileExtension. [hack!]

Thanks for the pointer to buildObject.




More information about the Frontier-Users mailing list