I'm now 3 days into pulling my hair out trying to get a custom calendar/events behavior to do what I need it to.

Two questions:

1.  I can't seem to deduce from the code the purpose of page.virtual (or page_virtual within the behavior context). How is it used? How might the use of it help me in creating a behavior which generates it's own, well, virtual pages  a little like the Archive Behavior. 


2. I'm overriding find_page_by_url and taking all the paths above the page with the behavior as parameters to that behavior then outputting the page again... so my find_page_by_url looks simply like this in the behavior:

  def find_page_by_url(url, live = true, clean = false)
    @page
  end

Having went around the routes and everything else in this manner I'm not surprised that my <r:navigation tag no longer indicates a here or selected on these link even though the url's are a match... Is there a way to trick Radiant back into seeing my "virtual pages" as real pages in the proper context so that, well, I can use <r:navigation, among things?  


3. Am I thinking of this all wrong? I've studied the search and the archive behaviors to get this far but I'm going into uncharted area.  What I'm doing currently feels like a bit of a hack but I got here by trying to take Radiant with me instead of diving straight into the routes.rb and doing everything (including managing a separate set of layouts) in another app.... Maybe I should have just done that?


Any help is greatly appreciated. I've really struggled with this and have to release it tomorrow. I never did feel like I found just the right implementation.   

However, when I am done I will attempt to clean it up a bit, refactor as necessary and offer it to anyone here who might have use for an iCal subscription based event calendar/tags for Radiant.   

Thanks,

Loren Johnson

_______________________________________________
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