user852610
user852610

Reputation: 2265

show view in modal windows

Hi everyone I am doing a website in joomla 3

I want to execute a task when I open a modal windows, I show the view in the modal for this I do this..

this is the router of task to execute

<?php $link = JRoute::_('index.php?option=com_projects&view=proyectos&task=este&id='. $item->id);?>



<div class="span4">
<a href="#.<?php echo $link; ?>" role="button" class="btn" data-toggle="modal">
<img src="<?php echo JURI::root()?>/<?php echo $item->imagenportada; ?>"/></a>
</div>

and now the modal windows

    <div id="<?php echo $link ?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Modal header</h3>
        </div>
        <div class="modal-body">
            <p>One fine body…</p>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            <button class="btn btn-primary">Save changes</button>
        </div>
    </div>

but don´t work. any idea!

Upvotes: 0

Views: 636

Answers (2)

user852610
user852610

Reputation: 2265

Finally I add to my link

 <a href="#modal"  title="<?php $item->id?>" id="<?php echo $item->id; ?>" role="button" class="picture" data-toggle="modal">

and the modal windows

    <div id="modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Modal header</h3>
        </div>
        <div class="modal-body">
            <p>One fine body…</p>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
            <button class="btn btn-primary">Save changes</button>
        </div>

Upvotes: 0

vorillaz
vorillaz

Reputation: 6286

Check out that Twitter Bootstrap's JS and CSS is loaded http://twitter.github.com/bootstrap/javascript.html#modals

Upvotes: 1

Related Questions