Custom status

I need to add a status “Archived”, so that a page with not show up in
the original tree, but will show up in the archive when the user
changes the status. I have easily added the status in the status.rb
Model and it works just great on the archive page. Was does not work
is the link to the page. It gives me the “Page not found” page.

Is there any way to change this?

Keith B.
http//:www.keithbingman.com

Keith B. wrote:

I need to add a status “Archived”, so that a page with not show up in
the original tree, but will show up in the archive when the user
changes the status. I have easily added the status in the status.rb
Model and it works just great on the archive page. Was does not work
is the link to the page. It gives me the “Page not found” page.

Is there any way to change this?

Not at the moment. I could see adding a method to the status object
(Status#visible?) or something of that nature which would control
whether or not it was seen on the live site.

Right now there are at least two places that you would need to change in
order to get it to show up. One is in the page_context.rb in the
definition of children:each and the other is in site_controller.rb (if
my memory serves me correctly).


John L.
http://wiseheartdesign.com

Thanks John, that was just what I needed. The only thing I need to
change was page.rb in Models, just added the name on the new Status to

def published?
status == Status[:published] or Status[:archived]
end

Very easy…

Keith B.

Keith B. wrote:

Thanks John, that was just what I needed. The only thing I need to
change was page.rb in Models, just added the name on the new Status to

def published?
status == Status[:published] or Status[:archived]
end

Shouldn’t that be:

(status == Status[:published]) or (status == Status[:archived])


John L.
http://wiseheartdesign.com