Rails outside of CMS

0 views
Skip to first unread message

Fred Reed

unread,
Mar 1, 2010, 1:19:43 PM3/1/10
to skyli...@googlegroups.com
Hi all

I know someone asked about forms a while back, but I didn't see what I
was looking for.

In general, for rendering/handling forms, or any other thing one might
do on the server with plain Rails (i.e., not managed through Skyline),
what is the preferred way to do routing to and from skyline pages?

For example, in the simplest case, say I wanted to send a request to the
'not_skyline' controller in the /app/controllers directory with action
'something_simple' via a link on a skyline-managed page section (an html
href and/or a link-list link).

I'm a novice at this, but my first guess at a direct approach would be
to add an appropriate route to routes.rb ahead of the default route that
passes everything to the skyline 'page' controller, then create an
"external" link using the normal skyline link methods. But that seems
kind of brittle...

Are there better ways (e.g., named routes, url helpers, etc.) to create
links between skyline and non-skyline parts of the same Rails server?

Thanks

Fred

Luis Doubrava

unread,
Mar 4, 2010, 6:37:52 AM3/4/10
to skyli...@googlegroups.com
Hi Fred,

Unfortunately there are no helpers for this in SkylineCMS.

What we do when we need to create "special" content is create a
placeholder section with the appropriate templates that generate the
content we need.
Then we add a setting to SkylineCMS to identify our "special" page. In
the pages controller we then check to see we're on the special page
and if we are we make the preparations (i.e. get the parameters, set
the variables) we need to render the placeholder secttion.

Another way is of course what you already described.

Sorry I can't be of any more help on this one,

Luis

Reply all
Reply to author
Forward
0 new messages