Alexander / Aebian

Who am I?

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

The Categories


Arma CodeList
Legal Things
GitHub Projects
Media Creations
My Hardware
My Wishlist
Some Spotify

August 15th at 1:59am
Report a website issue
For best viewing experience use a 4k screen.
Sidebar ➠

❬ 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