basically all posts can be found at "website.com/blog/all" so do what you did in your example just replace /topics/cakes with /all and you are good to go.
I haven't done this exact thing before but something like this should work. What you have doesn't work because group.absolute_url equals the absolute url of the blog (no sub pages or queries) so it cannot equal /all therefore it would always be false.
request.domain grabs the actual url out of the address bar, whatever it is, you can then check it against your condition.
Well there isn't a variable for /all so as far I can tell there isn't a way to signify that you are on an all posts page unless you condition the domain. If you find something else please share.
but it would set all simple pages (all post, posts by topic, archive). You could do:
{% if is_listing_view %}
{% if topic %}
posts about {{ topic }} (heading if filtered by topic)
{% else %}
All posts (heading if all posts)
{% endif %}
{% else %}
Normal Heading
{% endif %}
The only issue is that filtering by date would be a wild card here as it would show the All Posts header. I have been meaning to look for a way to check if filtered by date but I haven't gotten to it yet so I don't know if it is possible. The {% if topic %} statement is checking if the variable topic is empty. The {{ topic }} variable is empty unless filtering by a topic, then it contains that topic.
If you want to use the same layout as your normal listing page and use pagination and you can just remove the {%if not simple_list_page %} condition from your {% for content in contents %} loop.
basically all posts can be found at "website.com/blog/all" so do what you did in your example just replace /topics/cakes with /all and you are good to go.
perfect that's exactly what i was looking for! thanks!
I also had a query about re-styling the blog social sharing module - the one that is output using this hubl really does fit with the website styling the icons just look bag, can't seem to find an easy way of just using nice neat matching icons...
{% blog_social_sharing "blog_social_sharing" overrideable=False, label='Blog Social Sharing' %}
This is in the Hubl docs under the social share module. You can just replace the image links.
The only issue I have found with this is that the images seam to be processed at a very small size and increasing the size with css only makes them blurry. I haven't played with it much though so it might be an easy fix.
I haven't done this exact thing before but something like this should work. What you have doesn't work because group.absolute_url equals the absolute url of the blog (no sub pages or queries) so it cannot equal /all therefore it would always be false.
request.domain grabs the actual url out of the address bar, whatever it is, you can then check it against your condition.
Well there isn't a variable for /all so as far I can tell there isn't a way to signify that you are on an all posts page unless you condition the domain. If you find something else please share.
but it would set all simple pages (all post, posts by topic, archive). You could do:
{% if is_listing_view %}
{% if topic %}
posts about {{ topic }} (heading if filtered by topic)
{% else %}
All posts (heading if all posts)
{% endif %}
{% else %}
Normal Heading
{% endif %}
The only issue is that filtering by date would be a wild card here as it would show the All Posts header. I have been meaning to look for a way to check if filtered by date but I haven't gotten to it yet so I don't know if it is possible. The {% if topic %} statement is checking if the variable topic is empty. The {{ topic }} variable is empty unless filtering by a topic, then it contains that topic.
Jun 30, 20178:10 AM - edited Jun 30, 20178:13 AM
Contributor
show all blog posts link
SOLVE
thanks i've kind of already got that setup, so i'm currently either outputting either a selective top listing page or a blog home page where ive got the lastest or most items, but i need a third listing page which would be my all posts page, im thinking to just add the pagination using javascript as i can then style how i like.
{% if is_listing_view %}
{% if topic %}
posts about {{ topic }} (heading if filtered by topic)
{% else %}
{% if request.domain == {{ group.absolute_url }}/all %} all posts {% endif %} {% else %} All posts (heading if all posts) {% endif %} {% else %} Normal Heading {% endif %}
If you want to use the same layout as your normal listing page and use pagination and you can just remove the {%if not simple_list_page %} condition from your {% for content in contents %} loop.