简体   繁体   中英

October CMS - Make different tab the default tab when editing a page?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM