Add meta item
- Use meta item for category/author lookups - Add Liquid filter to get values from meta item lists - Implement log on "returnUrl" parameter
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<article class="py-3">
|
||||
<form action="/user/log-on" method="post">
|
||||
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
|
||||
{% if model.return_to %}
|
||||
<input type="hidden" name="returnTo" value="{{ model.return_to.value }}">
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
<div class="row pb-3">
|
||||
<div class="col col-md-6 col-lg-4 offset-lg-2">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<a href="#" class="text-danger">Delete</a>
|
||||
</small>
|
||||
</td>
|
||||
<td>{{ post.author_name }}</td>
|
||||
<td>{{ model.authors | value: post.author_id }}</td>
|
||||
<td>{{ post.status }}</td>
|
||||
<td>{{ post.tags | join: ", " }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,10 +14,30 @@
|
||||
<p>
|
||||
Published on {{ post.published_on | date: "MMMM d, yyyy" }}
|
||||
at {{ post.published_on | date: "h:mmtt" | downcase }}
|
||||
by {{ model.authors | value: post.author_id }}
|
||||
</p>
|
||||
{{ post.text }}
|
||||
{%- assign category_count = post.category_ids | size -%}
|
||||
{%- assign tag_count = post.tags | size -%}
|
||||
{% if category_count > 0 or tag_count > 0 %}
|
||||
<footer>
|
||||
<p>
|
||||
{%- if category_count > 0 -%}
|
||||
{%- for cat in post.category_ids -%}
|
||||
{%- assign cat_names = model.categories | value: cat | split: "," | concat: cat_names -%}
|
||||
{%- endfor -%}
|
||||
Categorized under: {{ cat_names | reverse | join: ", " }}<br>
|
||||
{%- assign cat_names = "" -%}
|
||||
{% endif -%}
|
||||
{%- if tag_count > 0 %}
|
||||
Tagged: {{ post.tags | join: ", " }}
|
||||
{% endif -%}
|
||||
</p>
|
||||
</footer>
|
||||
{% endif %}
|
||||
<hr>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user