This is related to issues like #2548.
Add project data into the database. Make it normalized and easily accessible for database queries.
To follow up on #1: The system table already has the following columns:
- filename
- name
- type
- owner
- status
- bootstrap
- schema_version
- weight
- info
We'd like to propose adding two additional tables: projects
and project_info
, where data that applies to all project types can live in the projects
table, and data that applies to only one type of project (or only one specific project!) can live in the project_info
table.
projects
could have the following columns:
- name
(machine name of project - PRIMARY KEY)
- label
- description
- backdrop
- hidden
- required
- package
- tags
- stylesheets
- stylesheets-conditional
- scripts
- version
- dependencies
- bootstrap
- php
project_info
can have the following columns:
- name
(machine name of project - PRIMARY KEY)
- key
- value
Original issue:
It took a bit of pause and head scratching while reviewing the PR for #5820. There was a check for ($info_array['type'] == 'module' || $info_array['type'] == 'profile')
and then a call to system_rebuild_module_data()
in order to get the human-readable names of projects, and I thought "why not do the same for themes and layout templates as well?". Then I remembered all these inconsistencies we have all over the place, which urged me to file this issue here.
I would like to propose the following:
1. Have separate columns for the properties in the .info files of projects - not a single info
column with a BLOB of serialized data as we currently have it (which forces developers to unserialize it each time). The serialized data in that BLOB contains duplicate information that can already be found in other columns of that table (namely project name and project type).
4. Add data from .info files of layout templates to this table as well.
5. #2385
6. #2384
7. ...
Recent comments
Hello, @yorkshirepudding! Thanks a lot, I got it, all sorted out.
My layout template (layout--blog.tpl.php) doesn't work
Hi @Gnome and welcome to Backdrop When I create custom layout templates I put them in /layouts/custom/my_layout Note: you can split modules and layouts between contrib and custom...
My layout template (layout--blog.tpl.php) doesn't work
This post explains how to do this in Drupal 7. In Backdrop, File Entity is already part of core. You will need to download and install module Views Field View. https://drupal.stackexchange...
I Need to Display an Image in a View that was Uploaded to a Webform