This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Fibonacci
Fibonacci

How to create form like below?

I mean put the featured images on side instead of like tabs details, categories, group, stores.

Is there any additional CSS? Because, I just using secondaryTabs and it doesn't work.

Thanks

Tiipiik
Tiipiik

You also need to add this in your controller :

public $bodyClass = 'compact-container';

Then you will have to change the html of the create.html and update.html views of this controller. You should take a look at this controller's view to have an example => https://github.com/octobercms/october/blob/master/modules/backend/controllers/users/create.htm

Surahman
Surahman

Thank you. It works!

azahari21220
azahari21220

I test this out and while it works, it applies to all controller actions to which controller it is applied. How do I choose this layout to only affect on certain actions? For example, Preview action will have these layout, but Update action will use the default layout?

Thanks

JeffGoldblum
JeffGoldblum

Modify the bodyClass property from the specific controller action and return the controller action that you want to actually run.

public function preview($recordId) {
    $this->bodyClass = 'compact-container';
    return $this->asExtension('FormController')->preview($recordId);
}

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.