hi! i made a plugin and i would like to retrieve a property from it via twig. i have placed "{{ SELF.prop }}" in my partial which is in the component partials directory, but the property does not show when i access the page. i know that the property has a value, because i set a default value.
This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
You can write the code below in "YourCustomComponent.php"
public function getProperty($propertyName) { return $this->property($propertyName); }
then in your view you can do
{% set title = __SELF__.getProperty('title') %}
{% set description = __SELF__.getProperty('description') %}
Regards
Last updated
1-5 of 5