This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
roulendz
I have component proporties
public function defineProperties()
{
return [
'layout' => [
'title' => 'Appointment layout',
'type' => 'dropdown',
'default' => 'master'
]
];
}
public function getLayoutOptions()
{
return [
'for_master' => 'Appointment list for masters',
'for_clients' => 'Default list for clients',
'for_clients_small' => 'Small list for clients'
];
}
now my default.htm component looks like this
{% if layout == 'for_masters' %}
<div id="appointmentsTable">
{% partial __SELF__ ~ '::_forMaster' %}
</div>
{% elseif layout == 'for_clients' %}
<div id="appointmentsTable">
{% partial __SELF__ ~ '::_forClients' %}
</div>
{% elseif layout == 'for_clients_small' %}
<div id="appointmentsTable">
{% partial __SELF__ ~ '::_forClientsSmall' %}
</div>
{% else %}
And I do not like this :)
Is there a way do set dinamicly _forMaster - partial?? Like
{% partial __SELF__ ~ layout %}
or something! Any help would be apriciated!
Last updated
1-1 of 1