28 April 2008

Understanding Joomla URLs and Itemids

One of the most frequently asked questions on the Joomla forums is "What is the Itemid and what does it do?". Its something that frustrates even experienced developers ... witness the post called "Damn you, infernal item IDs!!!" on WhyJoomla.com.

I thought a quick tutorial would be useful and along the way we can break down other aspects of Joomla URLs.

An Example Joomla URL and Itemid

Let's use a news item called "Joomla Weekly News Magazine Issue 10" written by Brian Teeman.

If you navigate to this news item via Joomla.org, you can see this URL in the browser bar:

http://www.joomla.org/content/view/2985/33/

You see this because inside the administrator section of Joomla.org, Search Engine Friendly URLs have been turned on (Site => Global Configuration => SEO => Search Engine Friendly URLs = Yes). Its a shorter version of the real URL produced by Joomla:

http://joomla...=view&id=2985&Itemid=33

Breaking Down those Two URLs

Default URL

Default SEF URL

Other Examples

Component Name

option=com_content

content

option=com_wrapper produces a page using the wrapper component

This explains what the component is being asked to do.

task=view

view

task=emailform allows you to send the page via email

do_pdf creates a PDF copy of the page

Number to identify the content item

id=2985

2985

Joomla starts at 1 and works up, so there have nearly been 3000 articles published on Joomla.org

Number to identify the menu link leading to the content item

Itemid=33

33

Joomla starts at 1 and works up. "What is Joomla?" is menu link number 26. "Submit Your News" is number 75.

What's the point of the Joomla Itemid?

The Itemid is what Joomla uses to decide which modules and templates need to appear on the page:

For example, the Itemid for Brian's article is 33. What happens if we change that to 26 for example?

http://www.joomla.org/content/view/2985/26/

  • The purple "News" template changes to the red "Main" template.
  • The "News" modules disappear and the "Main" modules appear instead.

We can do the reverse and make "What is Joomla?" appear to be a news item:

http://www.joomla.org/content/view/12/33/

When you open up the Template Manager and assign templates to a particular page or open up a Module and assign it to a page, it is the Itemid that does the work.

There is a limit to how much of this messing around you can do this on Joomla.org because the site is really 6 separate sites. Each site has its own Itemid structure. We can use the same URL as above to take us to a different page on each site:

This is one reason why we recommend that people use Open SEF, Artio SEF or SEF Advance ... lots of Joomla sites have identical URLs. A quick search on Google produces 450 pages with the same URL /content/view/12/33. If you want to stand out and help Google understand the content on your page, it helps to have a Search Engine Friendly URL Component installed.

The Future of the Itemid in Joomla

The Itemid setup is undergoing a substantial revision in Joomla 1.5. You can find out more in this post by Johan Janssens, Joomla's lead developer.

Joomla and Drupal, Which One is Right for You?

During the last few months we've had a lot of clients who are very technically knowledgeable and coming to us to find out more after picking up on the buzz around CMS systems and Drupal and Joomla in particular.

With the upcoming releases of Drupal 5.0 and Joomla 1.5, both systems are poised to make a big leap forward. However those launches may not happen for several months and many companies need to make a decision now, balancing the pros-and-cons of both solutions.

After talking and developing answers for several clients, we decided to put all we'd written into one document to help other people with this decision. Some disclaimers before we start:

  • This is not an Drupal vs Joomla discussion, but an open acknowledgement that each choice is appropriate for different sites. Sometimes we have to tell clients that neither will work for what they want.
  • This is not a comprehensive list. Please feel free to tell us what we've missed or where we are wrong. Add your own thoughts via the link at the bottom of the form, or simply post a comment.

Comparison Table of Joomla and Drupal

Joomla [-]

Drupal [-]

Community Features

Yes
Community Builder. A solid component, but one that really needs an SEF extension to enable Youtube-style URLs.


Very impressive. Users can form groups and expansion of the registraion form is native to Drupal.

Shopping Cart

Yes
Joomla has Virtuemart and an integration of OSCommerce, both of which beat Drupal's ecommerce addon. Use OSCommerce if you need multicurrency options or if you have a payment gateway not supported by VM

No
Not recommended as it lacks tax and currency options. However, watch out for Ubercart which looks promising.

SEO

No
Poor out of the box. OpenSEF is OK and improving fast. SEF Advance is roughly comparable quality but costs 50 Euros. Code is not very well adapted for SEO.

Yes
The out-of-the-box URLs work well and can be improved with one easy addon. The code is generally lightweight and well-optimised.

Forums

Yes
Use Joomla with Simple Machines Forum, which is the path taken by Joomla.org. Joomlaboard integrates natively to Joomla but lacks many key features.

Yes
A native and very smooth forum, but lacking in the high end features of the best modern forums. VbDrupal is the best way to avoid this (a Drupal Vbulletin hack)

Multimedia

Yes
Yes, plenty of podcast and video options.

Yes
Yes - Drupal Video and podcast options also available.

Photo Galleries

Yes
Yes. The best are integrations with Gallery2 and the Flash gallery Expose.

Yes
Has a default module and a Gallery2 integration.

Event Calendars

Yes
Several native plug-ins and integrations.

No
Not great. There are options but they are far behind those available for Joomla.

Template / Themes

Yes
Joomla has a wide selection of free and commercial offerings. Once installed they can be assigned to different pages.

No
Only one commercial developer. Off-the-shelf choices are very poor. Currently, Drupal assumes one template for all pages, although this can be adapted with effort and will 5.0 will allow templates to be assigned according to URL. Developing your own is the best bet.

Blogs

Yes
Some out-of-the-box capability. A good overview is here. Joomla.org uses a port of Wordpress.

Yes
Good capabilities, although not a natural blog in the manner of Wordpress.

Document Management

Yes
Yes - DocMan.

No
Not anything worth considering.

User Permissions

No
Some very major forks can work with Joomla, but this is a very poor area. Joomla is very admin-orientated. A small group of people are going to control and run the site. A lot of members can contribute by adding content, forum posts etc. but it is difficult to increase their permissions further.

Yes
Drupal wins hands-down. However, you still can't manage single members. You need to add them to a certain group.

External Integration

Yes
Joomla 1.5 will help greatly with a much improved API and more hooks.

Yes`
Currently Drupal wins easily with plenty of hooks

Content Management

No
In the core only Section >> Category >> Content is available. That's it. No cross-categorization.

Yes
Unlimited categories and subcategories. Also allows for cross-categorization of articles.

Multisites Management

No
Commercial component.

Yes
Out-of-the-box.

Documentation

No
Poor, although work on this is progressing. There is however a wealth of useful information on the Joomla forums. Joomla 1.5 promises to be much more thoroughly documented.(Click here for 1.5 documentation.

Yes
Not too bad. (Click here for documentation and here for an API reference guide

SSL Compatible

No
With hacks.

Yes

Standards Compliance

No
Not great. Accessible Joomla is a fork necessary to move Joomla towards compliance. Mambo/Joomla dates from before standards were even considered (1999).

Yes
Yes. Excellent out-of-the-box.

Internationalization

No
With Joomfish. Not an easy or straight-forward solution

Yes
Yes, Excellent. (via i18n module)

Commercial Community

Yes
Very strong. Perhaps the best in the Open Source CMS world. Try Try Joomla Yellow Pages or Joomla.org.

No
Weak. Difficult to find strong Drupal developers in any quantity. Try Drupal.org, Drupal Yellow Pages or Drupalancers.

General Community

Yes
Great. 100s of extra components available, both commercial and open source. Many companies now offering services.

Yes
Good community. Often more non-profit than business driven. Excellent forum support at Drupal.org.

Ease-of-use

Yes
Joomla has a great graphical interface in separate area of website.

Yes
Administrator tasks on the current Drupal version are done via a menu on the frontpage which confuses many. Drupal 5.0 will solve this and also provide an online installer. Still, installing many modules needs technical knowledge.

Learning Curve

Yes
Shallow. One of the very easiest CMS systems to learn and customize.

Yes
A little steeper than Joomla, but still relatively easy to learn.

Speed

Yes
A default installation of 1.0.11 loads in 0.90 seconds.
A default installation of 1.5 loads in 1.33 seconds. (Scores from http://sitescore.silktide.com)

Yes
A default installation loads in 1.05 seconds.
(Score from http://sitescore.silktide.com)

Size

1.0.11 is 16.4 MB
1.5 is 16.7 MB

Version 5.0 is 2.89 MB

Current Situation

Unclear. When will Joomla 1.5 be out? Which version should people currently buiding sites use? One developer recently warned about relying on any firm deadlines or easy upgrades to the new version.

Clear development path. Currently working on Drupal 5. Beta 2 came out at the end of November and a Release Candidate is probably next.

Overall

Joomla 1.5 will be the crucial leap for the platform paving the way for the resolution of many old limitations. Producing a good-looking site with plenty of functionality is a relatively easy task with Joomla.

Drupal is more community-oriented and the current live version is more extensible. That advantage will be greatly shortened once Joomla 1.5 is stable.

Instalasi Joomla

Joomla adalah salah satu CMS (Content Management System) yang terpopuler saat ini. mungkin ada yang bertanya apa itu CMS?? CMS adalah semacam website yang sudah jadi dan hanya tinggal pake. CMS ini dibuat untuk memenuhi kebutuhan public akan website. Jadi untuk lebih mengerti apa itu CMS, bisa di analogikan dengan MS Word, MS Word adalah software penanganan text yang dibuat untuk public dengan berbagai macam fasilitas. Nah CMS juga sama seperti MS Word. Sudah jelas kan!!.

setelah sebelumnya gelar CMS terpopuler di miliki oleh PHP Fusion, PHP Nuke, Mambo CMS dan kini Joomla CMS. Kalo di perhatikan Joomla CMS ini banyak sekali kemiripan dengan Mambo CMS. Anda tahu kenapa? Karena salah satu develop nya joomla adalah mantan karyawan nya Mambo CMS jadi bukan karena mbajak Mambo CMS.

Articles ini ditujuakan bagi siapa saja yang ingin mempelajari tentang Joomla CMS lebih jauh. Saya akan memulai nya dari dasar, yaitu mulai dari cara menginstall joomla di computer local. Oke anda setuju?? Bila setuju silahkan lanjutkan…

Langkah Pertama

sebelum anda menginstall Joomla CMS check dulu apakah computer anda sudah terinstall PHP Server? Apakah anda punya master Joomla CMS?? Kalau computer anda belum terinstall PHP Server, silahkan anda install dulu bila anda belum punya master Joomla CMS, silahkan anda download dulu masternya di http://joomla.org

Kedua

Oke pada langkah ini saya anggap semua kebutuhan dasar sudah terpenuhi (Server, Master Joomla CMS). Kini anda extract Master joomla (bila file masih berupa *.zip atau *.rar). setelah di extract, silahkan anda copy master joomla ke dalam folder server (secara default folder server terletak pada folder htdocs (pada server seperti; PHP Triad, Apache2Triad, Xampp) atau jika tidak terdapat htdocs anda bisa meletakan pada folder www (bila server yang dipakai adalah seperti Appserv).

Ketiga

Setelah process copy selesai, kini coba anda buka salah satu browser example; internet explorer, opera, mozila, nestcape navigator, avant browser, dll. Coba anda ketikan pada address bar “localhost” kemudian tekan tombol enter. Apabila halaman localhost ditemukan itu artinya tidak ada masalah, sebaliknya bila tidak ditemukan, kemungkinan ada beberapa masalah yang terjadi dengan computer anda. diantaranya PHP server belum diaktifkan, bila masalah ini terjadi, coba anda aktifkan apacher server pada pengaturan server anda.

Keempat

Ok kali ini langkah keempat langsung menuju instalasi Joomla CMS. Sekali lagi pada langkah ini saya anggap langkah pertama sampai ketiga tidak ada masalah. Untuk selanjutnya buka master Joomla CMS anda pada address bar di browser yang anda gunakan. Example : http://localhost/Joomla_1.0.13-Stable-Full_Package

Joomla tutorial Indonesian

Perhatikan gambar diatas, lihat tanda yang dilingkari merah. Itu artinya settingan register global pada server kita “On” / terbuka, dan di recomendasikan untuk di Off kan / dimatikan/ ditutup cara untuk menutup register global, anda bisa pergi untuk membuka file “php.ini” karena settingan register global ada di dalam file ini. baiklah kita pergi ke file “php.ini” biasanya terletak di C:/windows atau C:/windows/system32 atau kalau anda bingung dan tidak tahu location file “php.ini” anda bisa cari tahu di http://localhost/phpinfo.php

joomla tutorial indonesia

Anda tahu, bahwa file “php.ini” terletak di c:\windows\php.ini. tanpa buang waktu, langsung aja pergi ke lokasi C:/Windows lalu open file php.ini. setelah anda buka, cari string “register_globals”. Lalu ganti valuenya menjadi “Off”.

Setelah diganti, silahkan anda restart server PHP anda. lalu buka kembali url joomla anda.

tutorial install joomla cms

Lihat! Tidak ada tanda kuning lagi bukan. Meskipun sebenarnya tanda kuning / warning register globals on tadi tidak wajib di hilangkan alias seandainya tidak di off kan register globalsnya pun tidak masalah (hanya akan terjadi sedikit perbedaan saja pada performance dan security nya). Tapi setidaknya dengan register globals off akan selangkah lebih aman.

Setelah itu anda click next

tutorial install joomla cms

Kemudian ada page license click next

tutorial install joomla cms

Kemudian anda akan melihat page berikut

tutorial install joomla cms

Isikan textbox diatas dengan benar.

Hostname = nama host database tersebut

Mysql user name = nama user database tersebut

Mysql password = password mysql

Mysql database name= nama database mysql

Mysql table prefix= nama awalan dalam setiap table

Drop existing tables = menghapus table yang sudah ada sebelumnya

Backup old tables= menyalin table-table yang sudah ada sebelumnya

Install sample data = menambahkan sample data/ contoh data

Saya yakin dari keterangan diatas anda pasti mampu menyelesaikan tahap ini dengan benar. Jangan lupa jika semua textbox telah diisi click NEXT

tutorial install joomla cms

Jika muncul message box seperti gambar diatas, click tombol OK.

tutorial install joomla cms

Pada step 2 ini, silahkan masukan nama website yang anda inginkan pada text isian “Site Name” bila sudah tekan NEXT

tutorial install joomla

Pada step 3 akan anda temui sejumlah text box, diantaranya:

URL = berisi alamat host beserta subnya website tersebut

Path = berisi alamat asli file website tersebut

Your email = isikan dengan email anda

Admin password = pada text ini anda boleh menggantinya dengan kata apapun sesuka anda. bila sudah tekan NEXT

tutorial install joomla cms

Ini adalah step terakhir anda harus memperhatikan username dan password anda tadi. Jangan sampai lupa. Anda bisa melihat website anda dengan meng click “VIEW SITE” atau jika ingin langsung masuk administrator page silahkan click “ADMINISTRATION” pada pojok sebelah kanan atas.

Dan jangan lupa untuk menghapus folder installation pada file website anda atau boleh juga me rename nya/ mengganti nama foldernya saja. kini proses installasi joomla CMS telah selesai, dan jangan kemana-mana tunggu articles tentang cara penggunaan joomla CMS yang akan datang.