I'm on EE6.1 and I've built an add-on that installs its own channel and fields. I was hoping to add a publish layout and some tabs to organize the fields. I set up my array of fields, grabbed my channel ID from my insert and submitted everything via add_layout_tabs. It did not limit the tabs to the channel as the documentation suggested it would. So I looked at the function in the library and it takes an array of channel_id, but it doesn't do anything with it. Then I poked around the code to try to answer a few other questions I came up with, but to no avail.
So I'm here hoping someone else knows the answers to some of my questions.
- Why does the add_layout_tabs function not do anything with the channel_id like it seems it should? Am I going about this the wrong way and missing something?
- Unless I namespace my fields, the fields are ignored when being passed through the function. What's the point of this? That would keep me from moving the standards like url_title, wouldn't it?
- Whenever I add a a publish layout with the ChannelLayout model, I expected it to just be the standard layout you always get with a layout created through the CP. Instead it's only a publish tab with all of the fields in it. Not a big deal, but seems odd to me.