Home > Tip & Trik > [Drupal] Mengubah tampilan menu local task dari tabs menjadi dropdown

[Drupal] Mengubah tampilan menu local task dari tabs menjadi dropdown

Postingan singkat tentang drupal secara teknis. Materi kali ini adalah tentang mengubah tampilan menu local task yang biasanya berupa tabs diubah menjadi dropdown.

Tampilan awalnya adalah seperti gambar berikut:

Menu local menggunakan tabs.

Kode untuk mengubah tampilan tersebut menjadi dropdown adalah sebagai berikut:

Kode diatas harus dimasukkan dalam file template.php dari theme yang sekarang aktif. Jangan lupa ganti MYTHEME menjadi nama theme yang sekarang aktif. Dari contoh diatas, saya hanya mengubah pada primary menu local task, sedangkan untuk secondary menu local task saya biarkan seperti aslinya.

Oh iya, theme yang saya gunakan berbasis twitter bootstrap, jadi saya menggunakan class-class dari bootstrap untuk menampilkan dropdown menu.

Hasil dari coding diatas adalah sebagai berikut:

Menu local dalam dropdown

Mudah bukan?

You may also like
Drupal: Bulk Insert
Ciyeee, Drupal dan WordPress minta update barengan.
Membuat Chart di Excel menggunakan Drupal
Tabulasi data menggunakan views pada Drupal 7

27 Responses

  1. I simply wanted to thank you very much yet again. I am not sure the things I might have taken care of without these points shared by you concerning such subject matter. It previously was the terrifying case in my circumstances, but discovering this specialized form you resolved that took me to cry over gladness. I’m grateful for the advice and then hope you comprehend what a great job you were undertaking teaching people today all through your blog. I’m certain you haven’t come across all of us.

  2. I simply needed to say thanks all over again. I’m not certain what I would’ve undertaken in the absence of the strategies provided by you over this theme. It absolutely was an absolute daunting issue in my view, but looking at a expert strategy you resolved the issue forced me to weep for gladness. Extremely thankful for the support and sincerely hope you really know what a powerful job you are always accomplishing educating the rest through your webpage. I’m certain you haven’t met any of us.

  3. There are definitely lots of particulars like that to take into consideration. That could be a nice point to convey up. I supply the thoughts above as normal inspiration however clearly there are questions like the one you convey up the place a very powerful thing might be working in sincere good faith. I don?t know if best practices have emerged round issues like that, but I’m positive that your job is clearly recognized as a good game. Each boys and girls really feel the impact of only a second? pleasure, for the rest of their lives.

  4. Nice post. I be taught something more challenging on totally different blogs everyday. It can all the time be stimulating to read content material from different writers and follow somewhat something from their store. I? favor to use some with the content on my blog whether or not you don? mind. Natually I?l offer you a link on your internet blog. Thanks for sharing.

  5. I? impressed, I must say. Really hardly ever do I encounter a weblog that? both educative and entertaining, and let me let you know, you’ve got hit the nail on the head. Your idea is outstanding; the difficulty is something that not sufficient persons are talking intelligently about. I’m very completely satisfied that I stumbled throughout this in my seek for one thing relating to this.

Leave a Reply