Feature request: Layout access conditions that consider query parameters
Transcribing from the Github queue to perhaps get more visibility, this is from @bugfolder:
A recent forum post asked for a way to put a donation block on a single CiviCRM event page. This is an example of a broader need, of being able to customize specific CiviCRM pages with layouts and blocks. Elsewhere in Backdrop, we could use a URL path visibility condition for that, but since CiviCRM uses query parameters to distinguish pages and the URL path visibility condition doesn't consider query parameters part of the URL path, the URL path visibility condition won't work for that. So there is a need for a visibility condition that considers query parameters.
PR to follow.
Some further explanation (originally intended for a README file).
CiviCRM handles URLs differently from the rest of Backdrop in two ways, which can be illustrated by a typical CiviCRM URL, for example, an event page:
http://example.com/civicrm/event/info?id=1&reset=1
1. CiviCRM distinguishes between different pages by using _query parameters_, which are given by everything that comes after the `?` in this URL. 2. Backdrop paths typically include multiple words separated by `/`. While it looks like the Backdrop path for this URL would be `civicrm/event/info`, the _system path_ (used internally in Backdrop) for all CiviCRM pages is just `civicrm`.
This behavior complicates the problem of creating layout and block visibility conditions for CiviCRM pages in Backdrop.
When creating an alternative layout for a CiviCRM page, the layout must have the path
civicrm
(nothing more) to be considered for any CiviCRM page. But then it will be considered for every CiviCRM page. You can limit it to particular classes of page by using visibility conditions on the layout (or limit its blocks by using visibility conditions on the blocks).