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
{# This example shows table appends for creating a student roster #} | |
{% for row in registrations %} | |
{% if row['courseId'] == courseId %} | |
{% set courseRegistrations = courseRegistrations + 1 %} | |
<div class="form__row {{ registrations|length ? 'student' }}"> | |
<div class="form__field col-ml-5 col-sm-12"> | |
<input type="hidden" name="fields[checkoutAttendeeList][{{tableOffset}}][sessionId]" value={{ courseEvents|length ? courseEvents.one.id : null }}> {# Updates when date is selected #} | |
<input type="hidden" name="fields[checkoutAttendeeList][{{tableOffset}}][courseId]" value="{{ courseId }}"> {# Updates when date is selected #} | |
<label class="required form-label"> |
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 | |
/** | |
* Microsoft AX module for Craft CMS 3.x | |
* | |
* Integrates Craft CMS 3.X with an instance of Microsoft Dynamics AX | |
* | |
* @link dodgyco.de | |
* @copyright Copyright (c) 2021 Shawna O'Neal | |
*/ |
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
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL,"http://domain.com:8201/XXXXX/SERVICENAME/xppservice.svc"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlData); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); | |
curl_setopt($ch, CURLOPT_USERPWD, "DOMAIN\username" . ":" . "password"); | |
$headers = array(); | |
$headers[] = "Content-Type: text/xml; charset=\"utf-8\""; | |
$headers[] = "Soapaction:http://schemas.microsoft.com/dynamics/2008/01/services/SalesOrderService/create"; |
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
$ns1url = 'http://schemas.xmlsoap.org/soap/envelope/'; | |
$ns2url = 'http://schemas.microsoft.com/dynamics/2008/01/services'; | |
$ns3url = 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'; | |
// Sabre needs the urls above to include as namespace urls, | |
// For indicating namespacing per node, we need the curly brackets added. | |
$ns1 = '{' . $ns1url . '}'; | |
$ns2 = '{' . $ns2url . '}'; | |
$ns3 = '{' . $ns3url . '}'; |
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"?> | |
<x:Envelope | |
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"> | |
<x:Header/> | |
<x:Body> | |
<SalesOrderServiceCreateRequest | |
xmlns="http://schemas.microsoft.com/dynamics/2008/01/services"> | |
<SalesOrder | |
xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder"> | |
<SalesTable class="entity"> |
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
$ns = '{http://www.w3.org/2005/Atom}'; | |
$service->namespaceMap['http://www.w3.org/2005/Atom'] = ''; | |
$service->write($ns . 'feed', [ | |
$ns . 'title' => 'Example Feed', | |
[ | |
'name' => $ns . 'link', | |
'attributes' => ['href' => 'http://example.org/'] | |
], | |
$ns . 'updated' => '2003-12-13T18:30:02Z', |
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
$ns = '{http://example.org/}'; | |
$service->write('{http://example.org/}root',[ | |
$ns . 'title' => 'Foundation', | |
$ns . 'author' => [ | |
$ns . 'firstname' => 'Isaac', | |
$ns . 'lastname' => 'Asimov', | |
] | |
]); |
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
{% set sportArticles = craft.entries.section('articles').relatedTo(['and', | |
{ element : state }, | |
{ element : sport } | |
]) %} | |
{# Set Popular Articles #} | |
{% do craft.views_work.sortPopular(sportArticles, 'month') %} | |
{% set popularArticles = sportArticles.limit(6).all %} | |
<div class="hero" {% if sport %}style="background: url({{ sport.sportBackground.one.url('sportBg') }}) center center no-repeat; background-size: cover;"{% endif %}> |
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
<div class="popular-now" id="mainContent" tabindex="-1"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-4"> | |
<h2>Popular <span>Now!</span></h2> | |
</div> | |
<div class="col-4"> | |
<ul class="populars -first"> | |
{% for article in articles %} | |
{% if loop.index < 4 %} |
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
<main> | |
<section id="overview"> | |
<div class="container"> | |
<div class="intro"> | |
{% if entry.overviewIcon and entry.overviewIcon.one %} | |
<div class="icon"> | |
{% set img = entry.overviewIcon.one %} | |
<img src="{{ img.getUrl('iconMedium') }}" alt="{{ img.imageAltText|length ? img.imageAltText : img.title }}"> | |
</div> | |
{% endif %} |
NewerOlder