Help on initial setup.

98 views
Skip to first unread message

CJ

unread,
Mar 27, 2013, 10:41:35 AM3/27/13
to comfortable-...@googlegroups.com
Hi,

I have a few questions.  I have everything installed just fine. I created a layout app/views/layouts/wiki_layout.html.haml with the content https://gist.github.com/cj/fc1148130bbf514b84c4 and in my admin settings I have http://screencast.com/t/0TOAvVl7CZ but when I create a page and go to check it out, it doesn't render correctly http://screencast.com/t/QiZ9LFrB am I missing something?

Using markdown how do I get these editor buttons?  http://screencast.com/t/B6W3mWKJ

One last thing, is it possible to add an extra column here http://screencast.com/t/oUTm5Ncqlqg I wanted to add a permissions dropdown.

Thank you for your help in advance!

Oleg

unread,
Mar 27, 2013, 11:02:35 AM3/27/13
to comfortable-...@googlegroups.com
App layout (basically your normal .erb template) can't define cms tags.
It's not like Liquid templating. CMS layouts define content areas. App
layout is just a wrapper around `yield` that actually outputs content
from CMS.

Markdown doesn't have editor buttons. It's only there for the wysiwyg.

Yes, you can inject extra form fields into page form via ViewHooks:
https://github.com/comfy/comfortable-mexican-sofa/wiki/Reusing-sofa%27s-admin-area
Just plop this into initializer:
`ComfortableMexicanSofa::ViewHooks.add(:page_form,
'/layouts/admin/page_form')` and that partial can have something like
this: `form.select :permissions, whatever`. Mind you, you'll need to
inject attr_accessible into Cms::Page model or that attribute won't apply.

Hope this helps.

Oleg
> --
> You received this message because you are subscribed to the Google
> Groups "comfortable-mexican-sofa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to comfortable-mexica...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

CJ

unread,
Mar 27, 2013, 11:39:48 AM3/27/13
to comfortable-...@googlegroups.com
Thank you for the quick response!  I manage to get the layout working.  I also got adding the extra field partial working, I'm getting this error `undefined method `permissions' for #<Cms::Page:0x007ffd3539f410>` I'm pretty sure It's because I need to inject Cms::Page with attr_accessor and attr_accessible permissions.  I'm just not sure how to `inject` into that class.  How would I switch to wysiwyg?

Thank you again!
> an email to comfortable-mexican-sofa+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages