0

I have made a lightbox in jQuery, and I want to convert it to a module in Magento. With this module, I want a dropdown option under CMS, and be able to add galleries.

Then, I want to create a shortcode, to call these galleries inside a cms page or static block.

But I can't find any tutorial that can help me with that. I know the base of making a module, but now I want to upload images, make them into a gallery and display them on a CMS page.

If someone knows a good tutorial, I would love to hear it!

1 Answer 1

1

You Have to create 2 Admin grid.

  1. To add Galleries
  2. To add Images in that Galleries

From R&D i got one Extension related to above idea. (Not tested)

Then you can add custom select field in "Page Information" tab -> cms -> pages.

You can refer this Answer for that.

Edit in that answer : Instead of text we want select field. So in \local\ Sandipvaghasiya\CMS\Model\Observer.php use select field (Refer below)

$fieldset->addField('gallery', 'select', array(
          'label'     => 'gallery',
          'class'     => 'required-entry',
          'values'    => //array of galleries name,
          'name'      => 'gallery',
      ));

To get galleries name array, create function in existing model of above Image Gallery extension

Mage::getModel('[module]/[model file name]')->getNameArray()

create function getNameArray in that model file and return all gallery name array.

Note : Its a rough idea to start.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.