Skip to content

Instantly share code, notes, and snippets.

@chriwo
chriwo / realurl_conf.php
Last active June 29, 2018 07:12
RealUrl Multidomain setup with configuration for tx_news. You could copy & paste the code, but it's important to change line 4 and line 133. Replace the domain name and the PAGE_UID. In line 133 it's needed to replace the PAGE_UID with the page number of the detail news page.
<?php
$domainConfiguration = [
'www.first-domain.com' => PAGE_UID,
//'www.second-domain.com' => PAGE_UID,
//'www.third-domain.com' => PAGE_UID
];
$txRealUrlConfiguration = [
'init' => [
@chriwo
chriwo / responsiveNavigation.js
Created April 29, 2015 07:01
Duplicates a main navigation point into sub level and sets the Twitter Bootstrap "drop" options. As a result, one obtains in the MobileView a "normal" Bootstrap dropdown menu. In Desktop View the dropdown options are removed and you can use the menu with MouseHover effects. At an interval, the size of the browser window is checked, which adapts …
(function($) {
$.fn.responsiveNavigation = function() {
// check if dropdown navigation in mobile mode
var responsiveActive = $('li.responsive').length;
// window size lower 767px and nav is not in mobile mode
if ($(window).width() < 767 && !responsiveActive) {
$(this).each(function() {
$(this).parent().children('a').clone().prependTo($(this)).wrap("<li class=\"responsive\"></li>");
@chriwo
chriwo / htaccess
Last active February 1, 2018 12:36
Redirect all to index.html
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteRule ^.*$ /index.html [L,R=301]
@chriwo
chriwo / constant.ts
Last active May 18, 2017 21:12
TypoScript Language Menu
lib.language {
# select the language uid of languages in menu
uidList = 0,1,2,3,4
# language uid, if no languages in url given
normalWhenNoLanguage = 0
# set languages param in them order how "uidList"
addParams = &L=0 || &L=1 || &L=2 || &L=3 || &L=4
@chriwo
chriwo / tt_address_selectBox.js
Last active June 18, 2018 08:14
Build a select box of tt_address user. Changes in select box get full information of tt_address user, e.g. phone, address, email. The CSS classes and id's would be work with twitter bootstrap. TYPO3 v6.2
jQuery(document).ready(function() {
var dselect = jQuery('.contact-select').val();
jQuery('.contact div#contact-' + dselect).show();
jQuery('.contact-select').on('change', function() {
var cselect = jQuery(this).val();
jQuery('.contact div.contact-wrapper').hide();
jQuery('.contact div#contact-' + cselect).show();