Submitted by melinda on Mon, 02/20/2023 - 21:39
1. After saving a new content item entity of type Event
2. User has role(s)
Parameters: user: @user.current_user_context:current_user, roles: [reg_admin], operation: AND
3. Page redirect
Parameters: url: http://yoursite.site/product/add/webinar?destination=/node/{{node.nid}}/products
Token is {{node.id}}
Submitted by melinda on Thu, 02/02/2023 - 17:24
Basic GET example
URL: http://example.com/jsonapi/node/article/{{article_uuid}}
Response
HTTP 200 response. The response body contains the JSON:API object of a single article node, including attributes, relationships, and links.
Submitted by melinda on Thu, 01/26/2023 - 11:12
The expressions:
outputs('Get_file_content_using_path')?['body']['$content-type']
outputs('Get_file_content_using_path')?['body']['$content']
The Html for the body:
<img src="data:@{outputs('Get_file_content_using_path')?['body']['$content-type']};base64,@{outputs('Get_file_content_using_path')?['body']['$content']}" />
Submitted by melinda on Fri, 12/09/2022 - 09:35
#block-cart .cart-block--contents {
width: 300px;
background: white;
color: black;
font-size: 14px;
border: #033558 3px solid;
}
#block-cart .cart-block--contents__inner {
padding: 10px;
}
Spaces the columns
#block-cart .cart--cart-block .cart-block--contents td{
padding-left: 1em;
}
Separates the items in the cart
Submitted by melinda on Mon, 11/21/2022 - 15:19
<div class="logout-myaccount-page">
{% set url = url('<current>') %}
{% if (logged_in) and 'participant' in url|render|render %}
<ul>
<li>{{ link('My Account', 'route:user.well-known.change_password') }}</li>
<li>{{ link('Logout', 'route:user.logout') }}</li>
</ul>
{% elseif (logged_in) and 'edit' in url|render|render %}
<ul>
Submitted by melinda on Fri, 11/18/2022 - 14:37
/*Upgrade Button for view*/
if($statuses['floater']) {
$options = ['absolute' => TRUE];
$url2 = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' => 67], $options);
$url2->setOptions(['attributes' => ['class' => ['btn']]]);
$upgradebut = Link::fromTextAndUrl(t('Upgrade'), $url2);
}
Creates a button
Submitted by melinda on Thu, 11/10/2022 - 11:40
Case use:
{% if logged_in %}
{{ link('Logout', 'route:user.logout') }}
{% else %}
{{ link('Login', 'route:user.login') }}
{% endif %}
user.register:
path: '/user/register'
defaults:
_entity_form: 'user.register'
_title: 'Create new account'
requirements:
_access_user_register: 'TRUE'
user.logout:
path: '/user/logout'
defaults:
Submitted by melinda on Thu, 11/10/2022 - 10:25
The code in my template file. (Page.html.twig)
<div class="login-logout">
{% if logged_in %}
{{ link('Logout', 'route:user.logout') }}
{% else %}
{{ link('Login', 'route:user.login') }}
{% endif %}
</div>
My css to make my link display where and how I want it
Submitted by melinda on Tue, 11/01/2022 - 09:26
Came back from a weekend visiting my son and my Dell would load the Dell logo then go to a black screen.
This is what worked for me.
Unplug all the cords, USBs, Display Ports, HMDIs and the desktop immediately came on. One of my monitors had been unplugged from the power source, so I guess that was causing the BSOD for me.
Of course it could be something more serious than mine situation, but hopefully it is not and this fix is your solution too.
Submitted by melinda on Thu, 10/27/2022 - 19:04
Create a view using, "Users"

Pages