This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paragraph used for creating reusable content components in Drupal. | |
You can also create nested paragraphs using other paragraphs. | |
You can then create a layout for paragraphs for example displaying content in 2 columns in multiple ways | |
- Through manage display section of drupal paragraph configuration which can use a css grid like bootstrap. | |
- Using paragraph grid module but within the editor level which can use css grid like bootstrap and material grid. | |
- Hardcoding the particular paragraph twig file separate fields. Will require some coding. For example to display content into 2 columns you will need to loop through fields and display into 2 columns. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Helper function to verify file exists on Drupal website. | |
* | |
* @param string $path | |
* The file path. | |
* @param array $options | |
* Options for the HTTP request. | |
* | |
* @return array | |
* An array with 'exists' (boolean) and 'status_code' (int). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom_permissions.info.yml | |
name: 'Custom Permissions' | |
type: module | |
description: 'Overrides access permissions for a contrib module.' | |
core_version_requirement: ^8 || ^9 | |
package: Custom | |
dependencies: | |
- drupal:module_name | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Utilities for use in protecting an environment via basic auth or IP whitelist. | |
* Modified for use with Drupal 8 | |
*/ | |
function ac_protect_this_site($conf) { | |
//global $conf; | |
//$client_ip = ip_address(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Embed Option: IFRAME Vs oEmbed | |
IFRAME: | |
1. Depending on the browser (in this case, Chrome), you cannot use an iframe embed that points to an http source within Samepage. Since Samepage runs on https (to encrypt traffic between the server and the browser for users' privacy), Chrome requires anything that is embedded in the page to also be https.“Refused to display…'X-Frame-Options’ to ‘SAMEORIGIN’”. Will have to Set up a whitelist of domains that can render in an iframe. | |
2. User Experience may not be consistent. | |
3. There may be issues with different browsers and devices with rendering and security policy. | |
oEmbed: |