Thanks for the write-up. I've been using Shared Layouts but I learned
a few things I didn't know from this.
I do have two questions from what you've said, though
Sean Cribbs wrote:
Second, if you want your controllers to have more context within the
rest of the site's static content, you can create what I like to call
"application endpoints". Essentially, create a page within the page
tree that is of type 'Application' (classname RailsPage) at a URL that
matches your controller's route(s). Then when you hit your controller
action, anything that is not directly specified by your view or
controller, including title, breadcrumbs, page parts, etc will be
derived from the existing page. This allows you to keep context
within generated navigation or provide static text within your view
that is editable from the Radiant UI.
I thought when you built an "endpoint" all its parts were removed and
only your controller's views were used, instead. How can I edit the
static text in my view via the Radiant UI? That would be awesome.
Another neat trick you can do with share_layouts is to generate Radius
code from your controller's views. Since essentially anything
generated by the Rails view gets inserted into page parts and then
rendered as if it were a page, you can put anything you want in there
that is valid Radius code. Additionally, if you create an "endpoint"
in the tree and specify some filters on parts that will be overridden,
your view can be filtered with those filters.
So, in your example above, you created a "sidebar" and a "body" part
within your rails views. And I wanted to write the sidebar using
Textile and the body using Markdown, I would create an Endpoint Page via
the Radiant UI corresponding to my controller and in it create two Page
Parts - "sidebar" and "body" and assign each part the correct filter.
Is this correct?
-Chris
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant