Background: I am starting to package up three associated custom Joomla extensions that I've developed. (This is directly associated with my previous JSE question, if you want more context.) The package contains a component (com_o3_picture
) that started as a clone of com_contact
from the core, then was adjusted to suit client needs. Additionally, there is a editors-xtd
plugin to generate placeholders into Articles and a content
plugin to replace the placeholders with dynamic content.
Because I am using much of the same functionality of com_contact
, my install.mysql.utf8.sql
file creates a #__o3_picture_details
table. This is successfully done already.
A couple of months ago, when I test-installed my component by itself, I realized that I didn't have the Pictures>Pictures
and Pictures>Categories
submenus that I needed in the Administrator Menu's Components>Pictures
(to mirror the options that Contacts provides). So I manually inserted some rows into #__menu
to solve the problem. This was something that I "eye-balled" because I needed to reference generated ids to properly assign the parent-child relationships.
Questions:
How do I automate the Menu option process? Can this be cleverly done in the
install.mysql.utf8.sql
? or do I use a preflight call? or postflight? or an entirely different/better way?I know I need to insert to
#__content_types
. Are there any essential rows in other tables that should be inserted/updated? I mean,#__assets
is a table that might not need to be spoken to, but I'd rather do everything in my install rather than running a sync from PWT's ACL asset fixer. Another example is#__associations
-- I don't think I need to do anything to that one do I?
How can I be sure that I've created everything that is expected? Trial and Error? ...I'd rather not. Anyone have some experience/expertise to share?