Binary attachment behaviour? URL redirect behaviour?

I would be interested in moving some content out of the file system
and into Radiant. I don’t mean storing it in the database, but getting
Radiant to know about the content, and serving it with the correct
content type.

It could be done with just a hyperlink, I know, but I have some old
content that I am serving up by doing URL rewrites, or redirects, and
I’d like to be able to switch to using mongrel without having 404s
suddenly start appearing …

The problem could be solved by having radiant content that does the
redirect, or rewriting. Or am I missing something and should I just go
ahead and create the stub pages, and inside them write

<r:find url="/destination/of/rewrite/redirect">
<r:content/>
</r:find>

Which will solve the issue for the redirect/rewrite. And inside that
page, if I want to serve a PDF, I can create a link, leading straight
to the binary file (e.g a PDF). How can I eliminate the intermediate
page and have the content served straight after the legacy URL has
been rewritten?

Thanks in advance!

– G.

You can look at the page_part_type patch, and at the attachment
page_part
which does something very similar to what you want.
I think you’ll need a very small change to the code to get what you
want.
Dror

On Aug 24, 2006, at 1:35 AM, Guido S. wrote:

It could be done with just a hyperlink, I know, but I have some old
content that I am serving up by doing URL rewrites, or redirects, and
I’d like to be able to switch to using mongrel without having 404s
suddenly start appearing …

When you talk about rewrites and redirects, do you mean internal
(invisible to the client) redirects? I just slapped together a
behaviour to do http redirects (eg 301/302 http status codes), but
after reading your message again, I’m not sure exactly what you want
to do. Could you give us a concrete example?

Bodhi

See my post regarding the Asset List behaviour. I decided not to have
two types of behaviors once I figured out how to get what I want.

– G.