Skip to content

Commit

Permalink
Merge pull request ezsystems#27 from damianz5/eztags
Browse files Browse the repository at this point in the history
DEMO-91: Add TagBundle to eZ Studio Demo
  • Loading branch information
damianz5 committed Mar 28, 2017
2 parents 8a1dd74 + 69b75b3 commit 72a54bc
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/AppKernel.php
Expand Up @@ -62,6 +62,8 @@ public function registerBundles()
new EzSystems\CronBundle\EzSystemsCronBundle(),
new EzSystems\DateBasedPublisherBundle\EzSystemsDateBasedPublisherBundle(),
new EzSystems\PersonalizedBlockBundle\EzSystemsPersonalizedBlockBundle(),
new Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle(),
new Netgen\TagsBundle\NetgenTagsBundle(),
new AppBundle\AppBundle(),
);

Expand Down
2 changes: 2 additions & 0 deletions app/Resources/NetgenTagsBundle/views/admin/header.html.twig
@@ -0,0 +1,2 @@
<div class="ng-tags-header">
</div>
41 changes: 41 additions & 0 deletions app/Resources/NetgenTagsBundle/views/tag/view.html.twig
@@ -0,0 +1,41 @@
{% extends "eZStudioDemoBundle::pagelayout.html.twig" %}

{% set tag_keyword = netgen_tags_tag_keyword( tag ) %}

{% block page_head %}
{% set title = tag_keyword %}
{{ parent() }}
{% endblock %}

{% block content %}
<section class="tags-content content-view-full">
<div class="row">
<div class="col-md-8 col-md-offset-2 col-sm-12">
<div class="attribute-header">
<h1>{{ 'Tags'|trans }} / <a href="{{ app.request.requestUri }}">{{ tag_keyword }}</a></h1>
</div>

{% if related_content|length > 0 %}
<section class="content-view-children search-result-item">
{% for related_content_item in related_content %}
{{ render(controller(
"ez_content:viewAction", {
"contentId": related_content_item.id,
"locationId": related_content_item.mainLocationId,
"viewType": "search_result_item",
"layout": false
}
)) }}
{% endfor %}
</section>

{% if related_content.haveToPaginate() %}
<div class="pagination-centered">
{{ pagerfanta( related_content, 'twitter_bootstrap3_translated' ) }}
</div>
{% endif %}
{% endif %}
</div>
</div>
</section>
{% endblock %}
3 changes: 3 additions & 0 deletions app/config/routing.yml
Expand Up @@ -59,3 +59,6 @@ _ezpublishDateBasedPublisher:

_personalizedBlockRoutes:
resource: "@EzSystemsPersonalizedBlockBundle/Resources/config/routing.yml"

_eztagsRoutes:
resource: "@NetgenTagsBundle/Resources/config/routing.yml"
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -59,7 +59,8 @@
"ezsystems/date-based-publisher": "^1.0@dev",
"ezsystems/ezstudio-personalized-block": "^1.0@dev",
"ezsystems/content-on-the-fly-prototype": "~0.1.7",
"willdurand/js-translation-bundle": "^2.6.4"
"willdurand/js-translation-bundle": "^2.6.4",
"netgen/tagsbundle": "^3.0"
},
"require-dev": {
"ezsystems/ezplatform-i18n": "^1.0@dev",
Expand Down

0 comments on commit 72a54bc

Please sign in to comment.