Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
BN_IT_Support Posted January 4, 2023 Posted January 4, 2023 Hello Support... I followed the topic at: In addition to the main problem, the guide does not properly describe the naming and creation requirements: Layout name must start with "layout_" and cannot just be any old name that you choose - as in the document. You must not just copy all the settings to the "_preview" template as the base template has a single variable ($users) whereas the "_preview" template does not have any variables. The main problem occurs when using admin to create or edit a staff directory to specify the layout. The admin utility is forced to "Theme zero (id=0)" and you cannot follow the instructions in the document to edit this theme. The result is that the admin utility cannot find your custom layouts so they never get offered when creating or editing a staff directory. That's it. If you access the database directly and insert your custom layout name into the relevant records in core_leaders_groups then when users view the staff directory it works OK and your custom layout is picked up. (If you then use admin to edit the staff directory then it loses the custom group from that particular directory because admin cannot see it.) Having wasted a lot of time following the document and trying to get it to work, I now believe that a better method for our particular scenario is to hook into the 'layout_blocks' template and add our additional fields via the hook. In our scenario that has the added benefit that when we disable/delete our application (or plugin) it will also leave the directory definitions in a clean state that will continue to work (without the additional information). Regards, John
Jim M Posted January 4, 2023 Posted January 4, 2023 Thank you for your time and information on this. I have tagged this to a developer to help review what you have mentioned here and plan our next steps. BN_IT_Support 1
Recommended Posts