This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
pattern xml file name : cms_page_view_selectable_<CMS Page Identifier>_<Layout Update Name>.xml | |
--> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceContainer name="content"> | |
<block class="\Vendor\AboutUS\Block\Custom" name="vendor.about-us.custom" template="Vendor_AboutUs::custom-template.phtml" before="-"/> | |
</referenceContainer> |
This file contains 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 | |
/** Quick Example how to use updateFromSelect in Magento 2 */ | |
$this->connection = $this->resourceConnection->getConnection(); | |
$this->someTable = 'some_table'; | |
$this->tmpTableName = 'tmp_table'; | |
$condition = 'ft.' . MyInterface::CRM_ID . ' = tmp.' . MyInterface::CRM_ID; | |
$condition .= ' AND ft.' . MyInterface::CODE . ' = tmp.' . MyInterface::CODE; |
This file contains 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 | |
namespace MyNamespace\MyModule\Plugin\Model; | |
class PaymentInformationManagementPlugin | |
{ | |
/** | |
* Here is an example how you can alter the payment methods list in the checkout. | |
* Remove free and checkmo payment methods in the checkout |
This file contains 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
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="checkout.root"> | |
<arguments> | |
<argument name="jsLayout" xsi:type="array"> | |
<item name="components" xsi:type="array"> | |
<item name="checkout" xsi:type="array"> | |
<item name="steps" xsi:type="array"> | |
<item name="children" xsi:type="array"> | |
<item name="shipping-step" xsi:type="array"> |
This file contains 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 | |
// $this->logger = new Logger(); | |
// $this->logger->setLogFile('admin.log'); | |
// $this->logger->setTextBefore('user: '.$this->getUser()->getIdentity()->username); | |
// $this->logger->log($log); | |
class Logger { | |
private $logFile = 'logfile.log'; |
This file contains 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
{{ entity.field_name.value }} to get the true raw value, includes tags and encoding. | |
Example: {{ node.body.value }} | |
result: <p>Batman & Robin</p> | |
{{ content.field_name.0 }} to get the raw value minus tags and encoding. | |
Example: {{ content.body.0 }} | |
result: Batman & Robin | |
{% set parp_state = participating_state_1|render|striptags|trim|lower %} |
This file contains 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
const main = {}; | |
const updateScroll = () => { | |
main.winScroll = $(window).scrollTop(); | |
}; | |
const parallaxLoad = () => { | |
const $someEl = $('.someEl'); | |
$someEl.each((i,el) => { | |
let $el = $(el); | |
main.someEl[i] = $el; | |
}); |
This file contains 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
<input type="text" id="name"/> | |
<p id="warning></p> |
This file contains 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
let charts = { | |
curationstate: "Curation State", | |
modellingapproach: "Modelling Approach", | |
organism: "Organism", | |
journal: "Journal" | |
}; | |
// Note: the three equal signs so that null won't be equal to undefined | |
if (charts["curationstate"] === undefined) { | |
// do something |
This file contains 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
$("#classdemo-about img").click(function(){ | |
//console.log('yes'); | |
$('.btn-primary').attr('href', function() { | |
var vpar = '?vid=1'; | |
if (this.href.indexOf(vpar) == -1) { | |
return this.href + vpar; | |
} | |
}); | |
}) |