Graham
mans_bx Ok you would need to adapt this to fit your own custom blog twig and post list markup it is only to prove the concept
it does not give the entire post but it will give a random post list entry
This is in normal xtgem blog markup where the standard xtblog.twig has been renamed blog.twig
{% if data.translations.t_no_entries_found == 'random' and view == 'entries_list'%}
{% set entry=data.entries[random(data.entries|length-1)]%}
<div>
<a class="xt_blog_title_link" href="{{ entry.url }}">
<span class="xt_heading">{{ entry.title }}{% if data.entry_list_show_time %} <span class="xt_blog_entry_time">{{entry.created}}</span>{% endif %}</span>
{% if entry.comments_count %}
<span class="xt_blog_comments_number">( {{ entry.comments_count }} )</span>
{% endif %}
</a>
{% if data.display_type != 'header' and entry.content %}
<span class="xt_description">{{ entry.content|raw }}</span>
{% endif %}
</div>
{%else%}
{%include 'blog.twig'%}
{%endif%}
Copy code You then need a blog function with entries_per_page="0" and t_no_entries_found="random"
Remember that this can mess up the blog block id if you have other blog functions on the page so you may also need to allow for that
Mwebvendor
mans_bx They have no widget for random blog but they have xtblog twig.
Check this articles
http://forum.xtgem.com/index/__xt/post-oqp0yi6mk4estv1g33ba4fqp0yi6mk4estv1g3.html
But if use this twig, you have no pagination on your bloglist, the only one is the link to refresh the the bloglist.
Graham
Mwebvendor Yeah that one would also work but this one is simpler
Mwebvendor
Graham Thank for that graham,,, by the way that your code have a pagination?
Graham
Mwebvendor There is no point in paging a random list you just get another random list all you need is a reload button i had forgotten about that other script this uses the same code at its heart
Mwebvendor
Graham You mean is like a multiple bloglist? like one blgolist in main page and one random bloglist in sub-page?
Graham
Mwebvendor That script was created before i discovered how to use a blog parameter to select different twig files now I would separate that from the main twig
mans_bx
How to display it more than one?
Graham
mans_bx I am actually having difficulty getting it to work without repeats so I have to think about that