I am making a custom module with just a couple of routes inside of it. The module depends on the LightOpenID library, which I have included using composer, and have access to.
I created a field on the user object (field_steam_id), and the lightopenid provides a route to forward to the steam webapi to log them into steam, which sends back the users unique steam ID.
This value is then saved to their logged in user object via the field_steam_id and saved.
i'm developing a drupal 8 site with a custom theme, when i upload images in the content > Basic page i cant remove the height and width from the inserted image's.
i have tried:
function customtheme_preprocess_image(&$vars) {
if ($vars['style_name'] == 'IMAGE_STYLE_NAME') {
// Remove explicit width & height declaration.
unset($vars['width'], $vars['height'], $vars['attributes']['width'], $vars['attributes']['height']);
}
}
But that did not help, has somebody sugestions for me?
I want to build a page for a sports league and I have a content type "game" that can be used to describe a game. It has the following fields with corresponding field types in brackets:
I need a number of custom fields for my current development, 1 of these is effectively a base field which is used on it's own in some places, but it also extended into further custom fields.
Classic design suggests lots of small modules, however, these field types are bespoke to this project so it seems logical (in my mind) to incorporate all of these into a single project_custom_fields module. I have other non-related bespoke functionality in individual modules, but it seems overkill to have a module for each field type.
I am using the fantastic Ajax Login module (https://www.drupal.org/project/ajaxlogin) to show my login/register/change password forms as modals which works great but I cant figure out how to make a normal modal show its validation inside the modal. In my User profile template I have the following: