You could do this in an extension, but my main question is... why? Anyway, here's how I would do it in an extension:

#...

def activate
 Page.class_eval do
   def published?
     status == Status[:published] or status == Status[:hidden]
   end
 end
end

#...

Sean

Todd McGrath wrote:
Thank you, I see how this could work and appreciate the idea.

You know, I don't really like to modify the code outside of extensions, but
after a little code review, I guess a quick fix could also involve updating the
page.rb published? method:

def published?
  status == Status[:published] || Status[:hidden]
end

Or could I do this in an extension somehow?


Quoting Sean Cribbs <[EMAIL PROTECTED]>:

You might consider adding a part, like the technique used in the site-map idea, that you check for inside the <r:children:each> with a <r:unless_content> tag.

Sean

Todd McGrath wrote:
Hi,

I have a few result pages that should only render after a form submission.
Thank you for you submission, blah, blah. The problem I'm having is how
to
classify these pages to not show up in <r:children:each>.  It's not an
option
to move these pages to an area of the tree that will not be picked up by
r:children:each.

Do you know what I mean? I feel like I'm missing something obvious.
If I set the pages to hidden, it won't be found in <r:children:each>, but
it
also won't be found outside of dev.host?

Confused,
Todd
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to