Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to mount refinerycms engine on a custom path in existing rails application
    primarykey
    data
    text
    <p>I intend to integrate refinery cms into an existing rails 3.2 application.</p> <p>I setup a refinery engine as per this guide <a href="http://refinerycms.com/guides/with-an-existing-rails-app" rel="nofollow">http://refinerycms.com/guides/with-an-existing-rails-app</a>.</p> <p>I do not want refinery to generate all the pages in my app. Only a set of new ones.</p> <p>So in routes.rb I modified the following line:</p> <pre><code> mount Refinery::Core::Engine, :at =&gt;'/' </code></pre> <p>to</p> <pre><code> mount Refinery::Core::Engine, :at =&gt;'/cms' </code></pre> <p>In development mode (I am still testing if I can integrate successfully), when I run the server, if I manually type in</p> <pre><code> localhost:3000/cms </code></pre> <p>the cms system is available.</p> <p>But if I click on the home link or the links to any other pages created by refinery I get the following error:</p> <pre><code> No route matches [GET] "/" </code></pre> <p>This is because it has been configured by refinery to use the / path.</p> <p>If I manually type in localhost:3000/cms/(page name), then the pages get rendered.</p> <p>If the entry in routes.rb is the default entry</p> <pre><code> mount Refinery::Core::Engine, :at =&gt;'/' </code></pre> <p>Then the links to pages created by refinery work fine BUT, the existing pages that were created before I integrated refinery do not render, because refinery is overriding them.</p> <p>How do I customize the paths for page links created by refinery.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload