Skip to content

Instantly share code, notes, and snippets.

var uri = window.location.toString();
if (uri.indexOf("?") > 0) {
var clean_uri = uri.replace(/[^?=&]+=(&|$)/g,"").replace(/&$/,"");
window.history.replaceState({}, document.title, clean_uri);
}
@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
@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
=year(Fields!ModifieDate.Value)
Video: Section 5, 47. Expanding the chart
@ABooooo
ABooooo / choose
Last active September 11, 2019 08:12
=choose(Fields!Organisationlevel.Value, "Red", "Green", "Orange", "Blue")
if it is 1 then is red, if it is two then is green, if it is 3 is "orange", otherwise is blue
Video: Section 7, 56. Program Flow Functins
it can also be combined with iif
=iif(Fields!Organisationlevel.Value>3,"Blue",
choose(Fields!Organisationlevel.Value, "Red", "Green", "Orange"))
// function.php
// option page
add_action('admin_menu', 'option_page_create');
function option_page_create() {
$page_title = 'Theme Option';
$menu_title = 'Theme Option';
$capability = 'edit_posts';
$menu_slug = 'ae_theme_option';
$function = 'ae_theme_option_display';
styles.content.textmedia.maxW
in constants.ts file
var_dump($content);
Logger.Error(this.GetType(), ex.Message, ex);
// Add to lib file (example ab-design.at)
lib.currentPageId = TEXT
lib.currentPageId.data = TSFE:id
<f:if condition="{f:cObject(typoscriptObjectPath:'lib.currentPageId')} == 55">
<f:then>
// something
</f:then> <f:else>
// something