Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer to why these are not added into the portfolio extension by default is that the core team behind the portfolio hasn't had a case where they are useful. We rely on patches to improve or add functionality by people who do come across this need. There's <a href="https://github.com/resolve/refinerycms-portfolio/issues/39" rel="nofollow">an open issue</a> where nobody has really come up with a solution for yet.</p> <p>As for the implementation itself; to override the file you are wanting to override you must use the task "bundle exec rake refinery:override" (<a href="http://groups.google.com/group/refinery-cms/msg/44148ecfbfa757a3" rel="nofollow">using this post as reference</a>) like so:</p> <pre><code>bundle exec rake refinery:override view=portfolio/_main_image bundle exec rake refinery:override view=portfolio/show </code></pre> <p>This will put the templates in app/views/portfolio/ so that you can modify their contents.</p> <p>You will also have to change the migration syntax from rails 2 to rails 3 so instead of "script/generate" it's "rails generate". </p> <p>Because the images extension uses 'attr_accessible' by default for security you will have to use the following code somewhere like config/application.rb:</p> <pre><code># Make the title and body fields added to Image accessible for mass assignment config.to_prepare do Image.send :attr_accessible, :title Image.send :attr_accessible, :body end </code></pre> <p>Please let me know if you want any of this clarified or if I didn't quite answer your questions satisfactorily and I'll elaborate.</p> <p>EDIT:</p> <p>If you want to override the backend view for images, just follow the same process but for the backend views:</p> <pre><code>bundle exec rake refinery:override view=admin/images/_form </code></pre> <p>Now just add the fields in the same format:</p> <pre><code>&lt;div class='field'&gt; &lt;%= f.label :title %&gt; &lt;%= f.text_field :title %&gt; &lt;/div&gt; &lt;div class='field'&gt; &lt;%= f.label :body %&gt; &lt;%= f.text_area :body, :class =&gt; 'wymeditor widest' %&gt; &lt;/div&gt; </code></pre> <p>Because you've already added the attr_accessible code it will save fine.</p> <p>Let me know if this isn't what you wanted.</p> <p>Phil</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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