I have a form for a single dropdown select that uses a callback on change to update some elements on the page and make a few calls to an API, to update values in the API. Here's the code:
I have an exposed filter (dropdown) on a Drupal7 view displaying terms from a taxonomy list.
The dropdown is ordering alphabetically even though the taxonomy list is ordered by weight.
I've tried everything. Arrrghhh!
Can the order be set programmatically using form_alter or some other way?
I have some ads that use <script></script> that i get from a view and need to insert into a page. I made a view JSON export and tried to import them in the template with javascript, but looks like that is too late in the process. So, I instead added a views block that I imported in a custom twig template. The problem is that views surrounds the <script></script> in quoutes, so intstead of processing the script it just show the full script. I have tried to use | render | trim in twig to remove the outer quotes, but no success and I feel this is not the right solu
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?