This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
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.
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
ok, got it to work changed to: public function getProperty() { return $this->property('propertyName'); }
thanx for pointing me in the right direction.
Last updated
Thanks for the insight in this thread -- the post, the suggested solution, and the caveat (still seems to need the workaround)
1-5 of 5