Skip to content

Instantly share code, notes, and snippets.

lib.dynamicContent = COA
lib.dynamicContent {
10 = CONTENT
10 {
table = pages
select.orderBy = sorting
select.where = doktype != 199
as = pageId
renderObj = COA
SELECT
col,
COUNT(col)
FROM
table_name
GROUP BY col
HAVING COUNT(col) > 1;
@muex
muex / Create a One Pager with TYPO3 and TypoScript
Created August 22, 2018 20:41 — forked from koehlersimon/Create a One Pager with TYPO3 and TypoScript
Just a little code snippet to help you building a one pager website with TYPO3 CMS
// The one pager navigation
// You can choose any field from the page record with "{field:fieldname}"
// But I would recommend the field "alias" since it makes sense the most for navigation
lib.onepageMenu = HMENU
lib.onepageMenu{
special = directory
special.value = 44
1 = TMENU
1{
var
elements = document.querySelectorAll(".well"),
heights = [];
/* Getting an array with the heights */
[].forEach.call(elements, function(each) {
heights[heights.length] = getComputedStyle(each, null).getPropertyValue("height");
});
/* Sorting the array to get the greatest value first */
$(document).ready(function() {
$('a').on('click touchend', function(e) {
var el = $(this);
var link = el.attr('href');
window.location = link;
});
});
@muex
muex / hovernav.css
Created May 6, 2016 20:42 — forked from SimonPadbury/hovernav.css
This is a simple supplement for Bootstrap 3 to transform the navbar so that the dropdown menu appears on hover instead of on click. No need to modify the Bootstrap 3 js or css at all – simply add this js and css below to your js and css files that are <head> linked *after* the Bootstrap 3 js and css files. Styles for both .navbar-default and .na…
/*
Navbar "hovernav" dropdown menu - this works only for screen sizes larger than phones.
The Bootstrap CSS is unchanged.
*/
@media (min-width: 768px) {
/* Use this if you wish to hide the caret
.navbar-nav .caret {
display: none;
}
*/
@muex
muex / gist:e72b44c3c6bfd485e2cf
Created April 22, 2015 07:18
TYPO3 Error with required input fields
<input type="text" placeholder="Text eingeben" id="tceforms-textfield-55373da7c1aa8137713697" class="formField tceforms-textfield hasDefaultValue" name="data[tt_content][170][pi_flexform][data][options][lDEF][field2][vDEF]_hr" value="" style="width: 412px; " maxlength="256" onchange="typo3form.fieldGet('data[tt_content][170][pi_flexform][data][options][lDEF][field2][vDEF]','trim,required','',1,'');TBE_EDITOR.fieldChanged('tt_content','170','pi_flexform','data[tt_content][170][pi_flexform]');">
<input type="text" placeholder="Text eingeben" id="tceforms-textfield-55373da7c2110609805513" class="formField tceforms-textfield hasDefaultValue" name="data[tt_content][170][pi_flexform][data][options][lDEF][field4][vDEF]_hr" value="" style="width: 412px; " maxlength="256" onchange="typo3form.fieldGet('data[tt_content][170][pi_flexform][data][options][lDEF][field4][vDEF]','trim,required','',1,'');TBE_EDITOR.fieldChanged('tt_content','170','pi_flexform','data[tt_content][170][pi_flexform]');">
@muex
muex / validWithOpenGraph.php
Created June 16, 2012 20:55
makes page valid with opengraph tags
/* Put this in <head> /*
<?php
function is_facebook() {
if(!(stristr($_SERVER["HTTP_USER_AGENT"],'facebook') ===FALSE))
return true;
}
if(is_facebook()) {
OpenGraph Data
}