Using JRoute to build sef links in joomla

$style="float:left;
		color:white;
		margin-left:5px";
		$user =& JFactory::getUser();
		// print_r($user);
		$url = "index.php?option=com_users&view=entry_form";
		$path = JRoute::_( $url );
		echo "<span style='$style'>Welcome $user->username, Please add a new doctor from <a href=$path>here</a></span>";
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s