php - Removing next/previous links on first & last posts in Staceyapp V.3 with Twig -
I am using Stacey V.3 app for a small site of mine. On my blog posts, I want to link the previous and next to navigate through different positions. easy. What I would like to do on my last post, it will remove the 'next' link, which will be essentially a link to the post before my collection.
I do research and try to use this snippet which is not working
{pageibliblings%} {{For Brother Sister}% { % If loop.first%} should not be generated {% else%} {% include 'partial / next-page'% '%} {% Endif%} {% endfor%}
My knowledge of TIG and PHP can be written at the top of a pin, so I will be honest with you. I am trying to do something like this {else} {show a next and previous link on each post} Please do not shoot me because I am a news "
previous project page To remove the next project
link:
Change the contents of the template /partials/next-page.html with:
{ % If page.is_last%} & lt; P & gt; & Amp; Nbsp; & Lt; / P & gt; % Lt for Brother in {% Else%} {page.next_sibling%} P & gt; & Lt; A href = "{{sibling.url}}" & gt; Next project & lt; / A & gt;: & amp; Rarr; {{Sibling.title}} & lt; / P & gt; {% Endfor%} {% endif%}
and
To remove the previous project
link from the first project page:
Change the contents of templates / partial / previous-page with:
{% if page.is_first%} & lt; P & gt; & Amp; Nbsp; & Lt; / P & gt; {% Else%} {page.previous_sibling%} for Brother% lt; P & gt; & Lt; A href = "{{sibling.url}}" & gt; Previous project & lt; / A & gt;: & amp; Larr; {{Sibling.title}} & lt; / P & gt; {% Endfor%} {% endif%}
Comments
Post a Comment