$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
$nid = $node->id();
}
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
/* add to MODULE_NAME.info.yml */ | |
libraries: | |
- module_name/mncss | |
/* add to MODULE_NAME.libraries.yaml */ | |
mncss: | |
version: "1.x" | |
css: | |
theme: | |
css/styleforms.css: {} |
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
<section class="usa-hero"> | |
<div class="grid-container"> | |
<div class="grid-row"> | |
<div class="usa-hero__callout rd-hero__callout desktop:grid-col-4 desktop:grid-offset-8 tablet:grid-col-6 tablet:grid-offset-6 grid-col-12 grid-offset-none"> | |
<h1 class="text-base-darker usa-hero__heading"><span class="text-green">Seven</span> Research | |
Stations and <span class="text-green">81</span> Experimental Forests and Ranges.</h1> | |
<a class="usa-button usa-button--secondary" href="javascript:void(0)"><small>Learn more about | |
what we do</small> </a> | |
</div> | |
</div> |
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
if(jQuery("#YOURID").length > 0){ | |
jQuery("#YOURID a").each(function(i) { | |
console.log(this.text()); //show all the letters. | |
var letter = jQuery(this).text(); | |
if(letter == "a"){ | |
jQuery(this).attr("name","aye"); | |
} | |
if(letter == "b"){ | |
jQuery(this).attr("name","bee"); | |
} |