I want to set up a terrific home page, with a lot of different pieces of information and links. I know how to include videos, page links, and photos. Can you tell me how to add a summary of recent blogs on my home page (without making my home page the blog page)?
Yes, the same technique will work with most page types. For example, if you wanted to display the latest 2 suggestions, you would create a new file called something like _latest_suggestions.html with and the following code:
{% for post in page.suggestion_box.most_recent_suggestions limit:2 offset:0 %}
<div style="font-weight: bold; font-size: 16px;"><a href="{{ post.url }}">{{ post.headline }}</a></div>
<div class="byline">
Suggested by {{ post.author.published_name_linked }} · {{ post.published_at | date: '%B %d, %Y %l:%M %p' }}
{% if post.show_stream? %}
{% if post.public_activities_count > 0 %}
· <a href="{{ post.url }}#reactions">{{ post.public_activities_count }} reaction{% if post.public_activities_count > 1 %}s{% endif %}</a>
{% endif %}
{% endif %}
</div>
{% if post.suggestion.content.size > 0 %}
{{ post.suggestion.content }}
{% else %}
<p>
{% endif %}
<div class="continue_reading"><a href="{{ post.url }}">Read more</a> →</div>
<hr/>
{% endfor %}
Then in the template of the page where you want the suggestions to display, paste in the following:
{% subpage "suggestion_page_slug" with "latest_suggestions" %}
Replace suggestion_page_slug with whatever the slug is for your suggestion page.
Showing 7 reactions
Sign in with
http://nationbuilder.com/theme_documentation