Pergunta

I am using Comfortable mexican sofa for an existing application which is in Rails 4.

Function: On the app, There are contact details on various pages. A non-technical user would want to change the contact details once using cms and they are changed across the app.

Implementation so far: I reused the CMS admin area, created a scaffold Contacts. Now I can edit/delete the contacts in the existing webapp using CMS, however, What should be done to edit the contacts that appear in pages created by CMS?

Question 1. How do I use a bespoke contacts table fields in the pages created by the CMS(comfortable mexican Sofa)?

Question 2. How user friendly is it if a non-technical person has to use the syntax like {{cms:page:content}} while creating a page using CMS?

Thanks in Advance.

Foi útil?

Solução

All you really want to do is display contact info on pages? You can create a partial that handles the display and link it up via {{ cms:partial:... }} tag. Logic that is responsible for pulling contact info should be handled in the partial (you don't really have a controller here).

The idea is to have all the tags defined in the cms layout. You really shouldn't have any cms tags as part of the page content. It's not that you can't (page and field tags are layout only though), but it's way cleaner not to burden end-users with those.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top