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
/** | |
* Simple Site Module module for Craft CMS | |
* | |
* Simple Site Module CSS | |
* | |
* @author Mischa Sprecher | |
* @copyright Copyright (c) 2019 Mischa Sprecher | |
* @link https://www.marukka.ch | |
* @package SimpleSiteModule | |
* @since 1.1.1 |
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
// Thanks https://gist.github.com/marco79cgn/23ce08fd8711ee893a3be12d4543f2d2 for the code :-) | |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-blue; icon-glyph: magic; | |
let storeId = 178 | |
let country | |
let param = args.widgetParameter | |
if (param != null && param.length > 0) { | |
storeId = param | |
} |
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 canton = 'BS' | |
const apiUrl = (canton) => `https://data.bs.ch/api/records/1.0/search/?dataset=100077&q=&facet=date&facet=name&facet=abbreviation_canton_and_fl&refine.abbreviation_canton_and_fl=${canton}` | |
const apiUrlCH = `https://data.bs.ch/api/records/1.0/search/?dataset=100077&q=&facet=date&facet=name&facet=abbreviation_canton_and_fl` | |
const widget = await createWidget() | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) |
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
{# get url parameter 'filter' #} | |
{% set filterQuery = craft.request.getParam('filter') %} | |
{# if we have a query string, select these categories and find related entries #} | |
{% if filterQuery|length %} | |
{% set relatedCats = craft.categories.group('verguenstigungen').slug(filterQuery) %} | |
{# setup search parameters #} | |
{% set searchParams = { | |
relatedTo: relatedCats, |
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
// Routes.php : | |
/* AJAX Select DropDown Population */ | |
Route::get('api/dropdown', function(){ | |
$input = Input::get('catselect'); | |
$cat = Category::find($input); | |
$subcategory = $cat->subcategory(); | |
return Response::make($subcategory->get(['id','subcat_name'])); | |
}); |