October CMS - Make different tab the default tab when editing a page?
Ad
Is there any way to do this?
For instance, when editing a page the default tab is 'Settings'.
I have some new tabs assigned to the page, and I'd like to have one of these tabs the open tab by default. This is simply so the user doesn't see the code in the Settings tab and cannot interfere with it.
Any advice greatly appreciated.
Ad
Answer
Ad
All you need to do is to handle it with a javascript or jQuery code.
Make a new field in your model and its type should be partial
and locate the file anywhere within your plugin.
For example:
$/mynamespace/plugin/partials/my_js.htm
And in your partial write a javascript or jQuery code which removes class='active'
from the default tab li
and move it the one you want to be the default.
Ad
source: stackoverflow.com
Related Questions
Ad
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → 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
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad