This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example for category listing + most recent question - component
- Loading branch information
Showing
9 changed files
with
109 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,10 @@ Run composer install and follow instructions | |
``` | ||
$ composer install | ||
``` | ||
|
||
|
||
|
||
## ToDo | ||
|
||
* enable GenjFaqAdminBundle | ||
* |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/Demo/FaqBundle/Resources/views/Category/list_active.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,10 @@ | ||
<div class="sidebar-module sidebar-module-inset"> | ||
<h4>Categories</h4> | ||
|
||
<ul> | ||
{% for category in categories %} | ||
<li><a href="{{ path(category.routeName, category.routeParameters) }}">{{ category.headline }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
|
||
</div> |
24 changes: 24 additions & 0 deletions
24
src/Demo/FaqBundle/Resources/views/Category/show.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,24 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}{{ category.headline }} FAQ{% endblock %} | ||
|
||
{% block body %} | ||
|
||
<div class="blog-header"> | ||
<div class="container"> | ||
<h1 class="blog-title">{{ category.headline }}</h1> | ||
<p class="lead blog-description">{{ category.body }}</p> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<ul> | ||
{% for question in category.sortedQuestions %} | ||
<li> | ||
<a href="{{ path(question.routeName, question.routeParameters) }}">{{ question.headline|e }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
|
||
{% endblock %} |
10 changes: 10 additions & 0 deletions
10
src/Demo/FaqBundle/Resources/views/Question/list_most_recent.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,10 @@ | ||
<div class="blog-post"> | ||
<h2 class="blog-post-title">Most recent questions</h2> | ||
|
||
<ul> | ||
{% for question in questions %} | ||
<li><a href="{{ path(question.routeName, question.routeParameters) }}">{{ question.headline }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
|
||
</div> |
18 changes: 18 additions & 0 deletions
18
src/Demo/FaqBundle/Resources/views/Question/show.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,18 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}{{ question.headline }} - FAQ{% endblock %} | ||
|
||
{% block body %} | ||
|
||
<div class="blog-header"> | ||
<div class="container"> | ||
<h1 class="blog-title">{{ question.headline }}</h1> | ||
<p class="lead blog-description">{{ question.category.headline }}</p> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
{{ question.body|raw }} | ||
</div> | ||
|
||
{% endblock %} |