Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...

The Categories


Arma CodeList
GitHub Projects
Media (Gallery)
Privacy Policy
My Hardware
My Wishlist

July 16th at 6:10am
Report a website issue
For best viewing experience use a 4k screen.

nethavn Logo

❬ Back to Blog

Useful Codes for your octobercms installation

Some useful codes that you can use to extend your octobercms installation

In this Post I will show some twig / php codes useful for your own site.

Will be updated from time to time

How to display the User who posted the blog post?:

{{ post.user.first_name }} {{ post.user.last_name }}

How does my Disqus Comments Button work?:

The code requires that you have set-up disqus on your blog post page.

How to get the page id?

{{ }}
Add this somewhere to your site. Then Preview. The variable is replaced with the exact

Active Blog Tab also on Blog Posts

function onStart() { $this['activeMenu'] = 'blog'; }
Apply this to every page (blog post, blog posts, blog categories) of the Blog.
And the li code for it:

  • Blog