OctoberCMS Get plugin's Dropdown values at frontend
I have created one plugin (call it Product) using Builder Plugin and inside it, i have a dropdown (call it product_category (Product Category))
Using Builder Plugin, i have added few Key => Value (Dropdown Category options) like below.
Added Dropdown Options:
Showing Dropdown Options:
Now i have one CMS page (call it products) which i am showing in front end, and in which i am showing the list of the products, which works fine using the code like below.
Now here comes my question/query, i have a Product Category Dropdown in front end as well in a same page and i want to get all the Product Categories which i have added using my Builder Plugin.
How can i get those ?
Ok guys, eventually i have found out a solution thanks to alxy's help though and here what i have come up with.
$parser = new October\Rain\Parse\Yaml; $fields = $parser->ParseFile('/path/to/fields.yaml'); var_dump($fields);
Go here for more.
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page