• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Access options in template


Formerly MtoR

I have a question regarding the .less templates.
Is it possible to use the options inside them, tried so far but seems not possible unless I am missing something ?

I am trying to get the value of an option and set a width attribute using the option value + a 5px additional space.


Chris D

XenForo developer
Staff member
It is possible, in the same way as any other template:
Though that kind of syntax in .less templates does all kinds of ugly things. So you might want to do what we do in attachments.less:
@_attach-thumbSize: xf-option('attachmentThumbnailDimensions', px);