Fixed blog viewer route name according to naming conventions

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely POLONKAI (W00d5t0ck) 2012-09-16 22:12:05 +02:00
parent 208b99560b
commit df1a078bb9
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class BlogController extends Controller
} }
/** /**
* @Route("/{year}/{month}/{day}/{slug}.html", name="GergelyPolonkaiFront_blogViewPost") * @Route("/{year}/{month}/{day}/{slug}.html", name="GergelyPolonkaiFrontBundle_blogViewPost")
* @Template * @Template
*/ */
public function viewPostAction($year, $month, $day, $slug) public function viewPostAction($year, $month, $day, $slug)

View File

@ -21,7 +21,7 @@
<td><a href="{{ path('GergelyPolonkaiFrontBundle_adminEditBlogPost', {id: post.id}) }}">{{ post.title }}</a></td> <td><a href="{{ path('GergelyPolonkaiFrontBundle_adminEditBlogPost', {id: post.id}) }}">{{ post.title }}</a></td>
<td>{{ post.user.name }}</td> <td>{{ post.user.name }}</td>
<td>{{ post.createdAt|date('m/d/Y') }}</td> <td>{{ post.createdAt|date('m/d/Y') }}</td>
<td><a href="{{ path('GergelyPolonkaiFront_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}" target="gergelypolonkai_blogpreview">Preview</a></td> <td><a href="{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}" target="gergelypolonkai_blogpreview">Preview</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -1,5 +1,5 @@
<div class="post"> <div class="post">
<h3>{% if title_links %}<a href="{{ path('GergelyPolonkaiFront_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}">{% endif %}{{ post.title }}{% if title_links %}</a>{% endif %}</h3> <h3>{% if title_links %}<a href="{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}">{% endif %}{{ post.title }}{% if title_links %}</a>{% endif %}</h3>
<p class="article-date">{{ post.createdAt|date('m-d-Y :: H:i') }} by {{ post.user.name }}</p> <p class="article-date">{{ post.createdAt|date('m-d-Y :: H:i') }} by {{ post.user.name }}</p>
{{ post.content|insert_code_chunks }} {{ post.content|insert_code_chunks }}
</div> </div>