I am new in HWIOAuthBundle with Symfony2.3 +FosUserBundle. I am using this bundle for facebook, twitter, googleplus login in my project.
I have successfully install this and this working fine. But I want to override login.html.twig because I want to show facebook , twitter, google plus Images to our twig file but I don't know How I can do this in HWIOAuthBundle.
My login.html.twig
{% block content %}
{# Bonus: Show all available login link in HWIOAuthBundle #}
{% render(controller('HWIOAuthBundle:Connect:connect')) %}
{% endblock %}
Base HWIOAuthBundle login.html.twig
{% extends 'HWIOAuthBundle::layout.html.twig' %}
{% block hwi_oauth_content %}
{% if error %}
<span>{{ error }}</span>
{% endif %}
{% for owner in hwi_oauth_resource_owners() %}
<a href="{{ hwi_oauth_login_url(owner) }}">{{ owner | trans({}, 'HWIOAuthBundle') }}</a> <br />
{% endfor %}
{% endblock hwi_oauth_content %}
Which one showing this type in Html page:
Facebook
Google Plus
Twitter
this is show by default when click any one then redirect to his page(Facebook,Twitter,Google Plus).
But And I want to show this type HTML:
<!-- socials -->
<ul class="top-socials">
<li><a class="facebook" href="#">Facebook</a></li>
<li><a class="twitter" href="#">Twitter</a></li>
<li><a class="google-plus" href="#">Google+</a></li>
</ul>
How can I do this ?
You have two solutions for that :
/AcmeBundle/Directory/template.html.twig
is the exact same path to the template in your vendor)Doc :