0

I am working on a project and the plug in I installed won't work because I don't know how to add the jquery.css file needed.

What I did is to add the file with a <link> command but it's still not working.

Any help would be great.

    {% block body %}
<link type="text/css"  href="{{ asset('home/workspace/fermate/src/CtrlBln/HomepageBundle/Resources/public/js/Minimal-jQuery-Image-Viewer-with-Image-Preloading-ABigImage/bigimage.jquery.css')}}" > 
<div class="page-sidebar">
    {% for link in entity.getSidebarImages() %}
        {% if link.image.isFoto() %}            
            <a href="{{ app.request.basepath }}/{{ link.image.getWebPath() }}">         
                <img src="{{ app.request.basepath }}/{{ link.image.getWebPath("thumbnail_250") }}" alt="{{ link.image.title }}">                        
                <div class="sidebar-description">
                    {{ link.image.description|raw }}
                </div>  
            </a>        
        {% else %}
            <div class="sidebar-item sidebar-link-item">
                <a href="{{ app.request.basepath }}/{{ link.image.webpath }}">

                 <img src="{{ app.request.basepath }}/{{ link.image.getPreview() }}" />
                </a>
                <div class="sidebar-title">
                    <a href="{{ app.request.basepath }}/{{ link.image.webpath }}">
                      {{ link.image.title|raw }}
                    </a>
                </div>
            </div>
        {% endif %}
    {% endfor %}    
<script>
$(function(){
    $(this).abigimage();
});   
</script>
</div>
{% endblock %}

    {% block body_javascripts %}
        {% javascripts output='aBigImage.js'
        '@CtrlBlnHomepageBundle/Resources/public/js/Minimal-jQuery-Image-Viewer-with-Image-Preloading-ABigImage/abigimage.jquery.min.js'    
        %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
        {% endjavascripts %}
    {% endblock %}
1

Is asset() a Twig macro you've defined?

Are you sure you're just not looking for the global url() method instead?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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