What's the variable for a site's root URL?

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
markdarb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Dec 13, 2007 7:30 pm

What's the variable for a site's root URL?

Post by markdarb » Mon Dec 17, 2007 2:33 am

This is no doubt quite a silly question, but I haven't been able to find an answer to it.

I'm making a module, and I need the root URL of the Joomla installation. How can get this? I assume it's a variable within a class, but have no idea what it's called.

Opie
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Thu Jun 22, 2006 7:32 pm
Contact:

Re: What's the variable for a site's root URL?

Post by Opie » Mon Dec 17, 2007 2:36 am

If using 1.5, try JURI::base().
http://springhillalumni.org • Springhill High School Alumni Association

markdarb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Dec 13, 2007 7:30 pm

Re: What's the variable for a site's root URL?

Post by markdarb » Mon Dec 17, 2007 2:42 am

Thanks. That was exactly what I needed.  :D


Post Reply