Jump to content

Custom Staff Directory Layouts appears to be broken (and has been for a while)


Recommended Posts

Hello Support...

I followed the topic at: 

In addition to the main problem, the guide does not properly describe the naming and creation requirements:

  1. Layout name must start with "layout_" and cannot just be any old name that you choose - as in the document.
  2. 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

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...