Open record's Edit form in modal dialog (using Foundation)

Dear All,

I have created the CMS tutorial, so I have all the stuff to Articles. Everything works, but I wanted to modify my app to show the entry’s Edit form as a dialog. With foundation, the reveal-modal class can do that. If I create a div, create a button, it works. But I tried to modify my index.ctp:

$this->Html->link('Edit', array('action' => 'edit', $article->slug, $article['Articles']['id']), array('class' => 'button tiny')));

This shows the link to the edit function as a button, looks fancy. But How to define that the content of the edit.ctp (which is actually a form inside of a <div>) shoud appear as a dialog (reveal-modal)?

My problem is probably that I don’t really understand the logic of cakephp yet. If copy the content of the edit.ctp to the frontend.ctp, extending the example of foundation, it works, but I can’t choose the record id.

However, I don’t want to hurt cakephp’s logic and structure, so I would like to keep the edit form in the edit.ctp, and somehow open it as a dialog from there.