Static Pages

23 views
Skip to first unread message

Banjoey

unread,
Sep 15, 2011, 2:51:35 PM9/15/11
to Hobo Users
I'm trying to create some static pages (basically just some
"convenience pages" for my users with frequently used links. I found a
post in this group that said a way to do this would be to add the
"extra" page definitions to the front controller and then the
associated .dryml files to the front directory under views.

However, when I do this I am apparently not configuring something
properly because I don't know how to get to it. So if I call my new
"static" dryml page 'newpage', I do a "def new page; end" in the front
controller and then I create the 'newpage.dryml' file in the front
folder (right next to index.dryml), but I can't figure out how to get
to the page now. I tried localhost:3000/newpage but that didn't work,
and I can't get to localhost:3000/front#newpage either.

What am I doing wrong?

Thanks,
Joey

Bob Sleys

unread,
Sep 15, 2011, 6:25:59 PM9/15/11
to hobo...@googlegroups.com
I believe it would be localhost:3000/front/newpage

Though hobo may not make a route for it.

So you have a couple of options, make one yourself.

have hobo do it for you via extra routes added to default hobo action see http://cookbook.hobocentral.net/manual/controllers#adding_extra_actions

or again have hobo create them via web methods see

Banjoey

unread,
Sep 15, 2011, 9:44:01 PM9/15/11
to Hobo Users
Bob,

OK, great. I added the route manually (had a syntax problem the first
time I tried but I figured that out after your suggestion). Thanks!

However, when trying the other two methods below, I get errors from
hobo. With the first method (adding actions) I assumed it was because
the front controller hobo_controller instead of hobo_model_controller.
However, I get the same problems when trying the web_method way also
(web_method isn't a defined method or something like that). Is it
usable in hobo_controller controllers, or is it limited to
hobo_model_controllers also?

Thanks again for the help!

On Sep 15, 5:25 pm, Bob Sleys <bsl...@gmail.com> wrote:
> I believe it would be localhost:3000/front/newpage
>
> Though hobo may not make a route for it.
>
> So you have a couple of options, make one yourself.
>
> have hobo do it for you via extra routes added to default hobo action seehttp://cookbook.hobocentral.net/manual/controllers#adding_extra_actions

kevinpfromnm

unread,
Sep 16, 2011, 3:17:48 PM9/16/11
to hobo...@googlegroups.com
I usually just add an index_action :name and then redefine it.  hobo adds a route for GET requests to :controller/:name
Reply all
Reply to author
Forward
0 new messages