Adding titles and descriptions to images in Refinerycms-Portfolio

Posted by John Deely on Stack Overflow See other posts from Stack Overflow or by John Deely
Published on 2010-04-20T15:09:51Z Indexed on 2010/04/20 15:13 UTC
Read the original article Hit count: 460

Filed under:
|
|
|
|

I'm using the Refinery content management system with a the Portfolio plugin see http://github.com/resolve/refinerycms

I wanted to create a title and description for images uploaded to Refinery using Refinerycms-Portfolio so far I have done the following;

added the columns to the images table $script/generate migration AddTitleToImages title:string $script/generate migration AddBodyToImages body:text $rake db:migrate

modified the field div in this file, * highlighted vendor/plugins/images/app/views/admin/images/_form.html.erb

Use current image or, replace it with this one... ***** ***** ***** ***** "wymeditor", :rows => 7 %>

Added these lines to the main image partial in vendor/plugins/refinerycms-portolio/app/views/portfolio/ _main_image.html.erb

<%= @image.body %>

This works in the back-end except for a few visual bugs. The problem with this is when i click through the thumbnails in the front-end the titles and descriptions keep stacking on top of the previous titles and descriptions. The main image changes fine, but instead of refreshing the title and description, it adds the new one above the previous titles and descriptions.

How can i stop this repetition so that only one title and description will show at a time? I'm new to Rails and I am using Rails-2.3.5 and I suspect this can be solved using Java Script

thanks in advance, John

© Stack Overflow or respective owner

Related posts about rails

Related posts about cms