Cestfait.ch

  • Home
  • Drupal
  • PHP 5
  • Jquery
  • Web Dev
  • Sys admin
  • Logiciels libres
  • Videos
  • Divers
  • Nous contacter
  • Mon c'est fait!
Home

Drupal tabs

Submitted by Sir Squall on Wed, 04/28/2010 - 13:58

Ah les tabs de jquery que du bonheur, et en plus avec drupal c'est encore meilleures!

Il y un petit modules qui existe déjà : http://drupal.org/project/tabs

Et ce qui pratique c'est qu'il donne accès a une petite fonction qui charge tabs quand on en as besoin:

//init the tabs
tabs_load();

du coup pour faire des jolies tabs il nous suffit de faire sa:

 

/**
 * Admin
 */
function championnat_preparation_admin($aid){
  //init the tabs
  tabs_load();
 
  //add the js
  $js = '$(document).ready(function() {
    $("#tabs").tabs();
  });';
  drupal_add_js($js,'inline');
 
  $out .= '<div id="tabs">';
  $out .= '    <ul>';
  $out .= '        <li><a href="'.url('admin/stt/championnat/preparation/ligue/'.$aid,array('query' => 'overlay')).'"><span>Ligue</span></a></li>';
  $out .= '        <li><a href="'.url('admin/stt/championnat/preparation/ligue/'.$aid,array('query' => 'overlay')).'"><span>Groupe</span></a></li>';
  $out .= '        <li><a href="'.url('admin/stt/championnat/preparation/ligue/'.$aid,array('query' => 'overlay')).'"><span>Equipe</span></a></li>';
  $out .= '        <li><a href="'.url('admin/stt/championnat/preparation/ligue/'.$aid,array('query' => 'overlay')).'"><span>Options</span></a></li>';
  $out .= '    </ul>';
  $out .= '</div>';
 
  return $out;
}

Et le plus club c'est que les href sont le url qui vont être appellé :)

 

 

C'est fait !!!

0
Log in to vote
Your rating: None Average: 5 (1 vote)
  • Login or register to post comments
  • Share this
Tags:
  • Divers
  • drupal
  • jquery
  • tabs

2 reponses to "Drupal tabs "

1. C'est du bon :)

Submitted by Sir Squall on Tue, 06/08/2010 - 16:20.
C'est du bon :)
  • Login or register to post comments

2. Merci beaucoup !! Pour info,

Submitted by Anonymous on Wed, 06/02/2010 - 11:01.
Merci beaucoup !!
Pour info, ça marche en insérant directement le code dans un bloc au format PHP :
<?php
  //init the tabs
  tabs_load();
 
  //add the js
  $js = '$(document).ready(function() {
    $("#tabs").tabs({event: "mouseover"});
  });';
  drupal_add_js($js,'inline');
?>
 
<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Nunc tincidunt</a></li>
		<li><a href="#tabs-2">Proin dolor</a></li>
		<li><a href="#tabs-3">Aenean lacinia</a></li>
	</ul>
	<div id="tabs-1">
		<p>Contenu tab-1</p>
	</div>
	<div id="tabs-2">
		<p>Contenu tab-2</p>
	</div>
	<div id="tabs-3">
		<p>Contenu tab-3</p>
	</div>
</div>
  • Login or register to post comments

User login

  • Create new account
  • Request new password
  • Sign in with Twitter

Translate

Sondage

Qu'elle version de drupal utilisez-vous ?

Submitted by Sir Squall on Tue, 04/10/2012 - 16:30
  • Login or register to post comments

Recent comments

  • Arf, je suis à l'armée!
    40 weeks 1 day ago
  • hahaha c'est juste! Il n'y a
    46 weeks 4 days ago
  • yeah comme sa fait plaisir de
    46 weeks 6 days ago
  • wouahou merciii :-) !
    50 weeks 5 days ago
  • J'y réponds aujourd'hui ici
    50 weeks 5 days ago
  • Salut, court article mais
    50 weeks 6 days ago
  • Oktoberfest power!!!
    1 year 3 weeks ago
  • yep je vais faire un petit
    1 year 5 weeks ago
  • It's regular approuved
    1 year 5 weeks ago
  • Pas d'exemple????
    1 year 5 weeks ago

Tags

cropping Divers drupal Drupal emacs firefox gmap Google Images Jquery jquery karmic koala La phrase du jour Lausanne Logiciels libres mysql PHP 5 RPG Sys admin ubuntu Web Dev yasnippet youtube Zend
more tags

Popular content

Today's:

  • Squall Beer Challenge '09
  • 8ème Forum eCulture - ERACOM - 4 septembre 2009
  • Emacs Transparent
  • Grep afficher les lignes avant et après
  • Trip to antwerpen !
  • viportuguese-shop.com
  • Boxxy likes Drupal
  • Bash scripting MySql
  • Drupal and Zend, form validate :)
  • Drupal Mollom sa rox!

All time:

  • Drupal 7 effet avec les jquery.ui.dialog sur Drupal 6 !
  • Dries Keynote DrupalCon Paris 2009
  • Drupal bridge zend yeah !!
  • Jquery slider c'est de la bonne !!!
  • Drupal and Zend, form validate :)
  • Jquery JSON en _POST
  • [Drupal] Lightbox avec une gmap! yeah
  • [Drupal] Domain Access & memcache sa donne quoi ?
  • viportuguese-shop.com
  • Node Import et Taxonomy CSV

Last viewed:

  • Trip to antwerpen !
  • Drupal solr attachement intégration
  • [Drupal] Lightbox avec une gmap! yeah
  • Drupal sitemap module
  • Drupal, nodeapi full et de base
  • Drupal intranet performance
  • Drupal intranet performace
  • [Drupal] Domain Access & memcache sa donne quoi ?
  • Drupal date avec des formats custom
  • [Drupal] créer des functions javascript a la volée!

Twitter

Latest Articles

Derniers liens publiés

  • Get the list of all enabled module
    http://drupal.org/node/440962
  • Cloudflare et Dropbox nommés Technology pioneers
    http://techcrunch.com/2011/09/01/cloudflare-dropbox-palantir-and-kickstarter-named-technology-pioneers-by-the-world-economic-forum/
  • Apprend le javascript en t'amusant
    http://www.codecademy.com
  • EPSACrop sur Drupal 7
    http://www.aswissidea.org/
  • Drupal solr attachement intégration
    http://tika.apache.org/

Pub

Google gadget

Add to Google

Facebook page

jiwa

all good song

Partenaires

Cyber Warfare

Drupal Factory

Dev Factory

I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.