converted tag template to twig
This commit is contained in:
parent
acf2f6e86c
commit
30c0ff72cf
3 changed files with 33 additions and 16 deletions
15
index.php
15
index.php
|
@ -33,9 +33,18 @@ class ThemeEngine
|
|||
]
|
||||
);
|
||||
break;
|
||||
case "":
|
||||
require __DIR__ . "/views/index.php";
|
||||
break;
|
||||
case "/tags":
|
||||
$tags = $this->data["tag_list"];
|
||||
echo $this->twig->render(
|
||||
"theme-fipamo-default/fipamo-default/tags.twig",
|
||||
[
|
||||
"debug" => true,
|
||||
"title" => "Pages Tagged as Tag",
|
||||
"background" =>
|
||||
"/src/themes/theme-fipamo-default/fipamo-default/assets/images/global/default-bg.jpg",
|
||||
"tag_list" => $tags,
|
||||
]
|
||||
);
|
||||
case "/archive":
|
||||
$archive = $this->data["archives"];
|
||||
echo $this->twig->render(
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
extends frame
|
||||
|
||||
block main-content
|
||||
section
|
||||
.page-title
|
||||
span= title
|
||||
article
|
||||
.page
|
||||
br
|
||||
- var index = 0;
|
||||
- for ( index; index < tag_list.length; index++)
|
||||
a(href='/'+tag_list[index].path+'/'+tag_list[index].slug) !{tag_list[index].title}
|
||||
br
|
21
src/themes/theme-fipamo-default/fipamo-default/tags.twig
Normal file
21
src/themes/theme-fipamo-default/fipamo-default/tags.twig
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "theme-fipamo-default/fipamo-default/frame.twig" %}
|
||||
|
||||
{% block title %}
|
||||
{{ title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block mainContent %}
|
||||
<section>
|
||||
<div class="page-title">
|
||||
<span>{{title}}</span>
|
||||
</div>
|
||||
</section>
|
||||
<article>
|
||||
<div class="page">
|
||||
{% for tag in tag_list %}
|
||||
<a href="{{"/"~tag.path~"/"~tag.slug~".html"}}">{{tag.title}}</a><br />
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</article>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue