Skip to content

Instantly share code, notes, and snippets.

=year(Fields!ModifieDate.Value)
Video: Section 5, 47. Expanding the chart
@ABooooo
ABooooo / count
Created September 11, 2019 06:42
=count(Fields!ListPrice.Value)
the number of elemnts not the sum of it, for example 10 products
@ABooooo
ABooooo / row bg color
Last active September 11, 2019 06:20
=iif(RowNumber("DataSet") Mod 2 = 0, "Yellow", "Transparent")
if rows from DataSet is dividable with 2 then should bg be yellow otherwise transparent
var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.replace(/[^?=&]+=(&|$)/g,"").replace(/&$/,"");
window.history.replaceState({}, document.title, clean_uri);
}
function isValidDate(dateString)
{
// First check for the pattern
var regex_date = /^\d{4}\-\d{1,2}\-\d{1,2}$/;
if(!regex_date.test(dateString))
{
return false;
}
Place it in functions.php:
add_filter( 'wpcf7_autop_or_not', '__return_false' );
MASK-Template:
<f:translate key="label" />
TYPO3-Setup:
plugin.tx_mask._LOCAL_LANG.de.label = Weiterlesen
plugin.tx_mask._LOCAL_LANG.en.label = Read more
https://stackoverflow.com/questions/52876865/typo3-mask-labels-based-on-language
RewriteEngine on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
$included_files = get_included_files();
foreach ($included_files as $filename) {
echo "$filename\n";
}
<div class="c-main-header__languageswitcher">
<ul class="u-no-liststyle">
<?php
$langs = array();
$languages = icl_get_languages( 'skip_missing=0' );
if( 1 < count( $languages ) ) {
foreach( $languages as $l ) {
$classes = ( $l['active'] == 1 ) ? 'is-active' : '';
$langs[] = '<li class="' . $classes . '"><a href="' . $l['url'] . '">' . $l['code'] . '</a></li>';
}