hanny13720240 said:
I'm still struggling to do this - so if anyone has any ideas - I'd love to hear them!
Ok, man. Sorry i was away for a few days. Lets dive into the RainLab.Blog plugin. I don't use it by myself but installed it for you.
Model "Post" have some fields like: id, title, slug and so on. But it also have an "excerpt" field.
I think - this is exactly what you need instead of doing your work with twig extension.
Is there a way to grab a particular article in twig?
Sure. You can execute php code:
https://octobercms.com/docs/cms/themes#php-section
Lets stick to this example from docs and be simple.
PHP code section. This code let you take one post model with id=1 and pass it to your page using array notation):
function onStart()
{
$this['mypost'] = \RainLab\Blog\Models\Post::where('id', 1)->get();
}
Now on the page you can do something dirty and raw:
{%for post in mypost%}
<h2>{{post.excerpt}}</h2>
<a href = "/blog/{{post.slug}}">{{post.title}}</a>
{%endfor%}
More
Keep in mind: you can expand every component(blog plugin have 4 of them) by clicking fork button(looks like this http://fontawesome.io/icon/code-fork/) and see what's inside, change something or add something.