Skip to content

Instantly share code, notes, and snippets.

View DuaelFr's full-sized avatar

Edouard Cunibil DuaelFr

View GitHub Profile
@DuaelFr
DuaelFr / gist:4664453
Created January 29, 2013 14:02
How to use Drupal messages within an ajax call.
<?php
/**
* Implements hook_menu().
*/
function MYMODULE_menu() {
$items = array();
$items['login'] = array(
'title' => t('Log in'),
@DuaelFr
DuaelFr / gist:1336384
Created November 3, 2011 12:32
Prestashop a11y lol
Sample found in blockuserinfo.tpl
<li id="shopping_cart">
{l s='Cart:' mod='blockuserinfo'}
<a href="{$link->getPageLink("$order_process.php", true)}" title="{l s='Your Shopping Cart' mod='blockuserinfo'}">
<span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
{if $cart_qties >= 0}