Hello everyone,
I'm relatively new to Drupal.
Before asking this question, I looked for my answers on forums and tutorials, without success because I still can't solve my problem.
I have a site developed under drupal 9. On this site, I need to retrieve information (among others: a list of events, users, etc..) from an external API (which is managed with swaggerui )
The API is a Rest API, with an endpoint.
To connect to it, I must already generate a token, and once the token is generated I can retrieve the information.
So I came across this article, which outlines how to create custom entities, and custom storage handlers for those entities. What isn't clear, is how to get Drupal to do this for external databases. Here's the scenario.
I have a Drupal installation that I am building a custom integration for. There is a secondary database setup with it's own relationships and schema. (Not Drupal related).
Drupal 8 and up don't like users to "do" PHP. That's somewhat understandable, although I feel the dreaded security risk is a tad exaggerated: a bit of basic user management can prevent a lot of harm. So, I for one Do like to have PHP available within Drupal, as it was in olden days - especially in a localhost development environment. Understandably, it was a very sad day when I found out that Twig templates don't accept PHP any more, like the PHP Template system used to do. I badly miss that!
When I add links to menu items the superfish menu shows expanded on all pages and stays fixed but not on the front page. If I remove the link then it will not expand.
I have a route /people/{{slugged-full-name}} in place to present a person based on data retrieved from a third-party API. I'd like to set the page title using data from some of the fields retrieved in the initial request to the API (which is handled through one of the controller's dependency injected services).
From my understanding it's no longer possible to dynamically set the title directly through the controller's render array, e.g.,