-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from lenybernard/feature/rss-feed
add Blog RSS feed
- Loading branch information
Showing
6 changed files
with
65 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Bundle/BlogBundle/Resources/views/Blog/Tabs/_links.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% trans_default_domain "victoire" %} | ||
|
||
<div class="vic-tab-content vic-modal-tab-content"> | ||
<div class="vic-tab-pane vic-active" id="links"> | ||
<ul> | ||
<li> | ||
<a href="{{ path('victoire_core_page_show', {'url': blog.url}) }}">URL</a> | ||
</li> | ||
<li> | ||
<a href="{{ path('victoire_blog_rss', {'slug': blog.slug}) }}">Flux RSS</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
{% extends 'VictoireCoreBundle::_modal.html.twig' %} | ||
<?xml version="1.0" ?> | ||
<rss version="2.0"> | ||
<channel> | ||
<title>{{ blog.name }}</title> | ||
<link>{{ url('victoire_core_page_show', {'url': blog.url}) }}</link> | ||
<description>{{ blog.seo|default({'description' : ''}).description }}</description> | ||
|
||
{% block modal_header_title %} | ||
{% if blog.seo and blog.seo.ogImage %} | ||
<image> | ||
<url>{{ blog.seo.ogImage.url }}</url> | ||
<link>{{ url('victoire_core_page_show', {'url': blog.url}) }}</link> | ||
</image> | ||
{% endif %} | ||
|
||
{% endblock %} | ||
|
||
{% block modal_body_content %} | ||
|
||
{% endblock %} | ||
{% for article in blog.articles %}<item> | ||
<title>{{ article.name }}</title> | ||
<link>{{ vic_business_link(article, null, constant('\\Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface::ABSOLUTE_URL')) }}</link> | ||
<description>{{ article.description }}</description> | ||
</item> | ||
{% endfor %} | ||
|
||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters