Usergroups & Static Page Links


I’m completely new to yii and still stumbling around in confusion…

I’m trying to create a footer link to a second contact form (similar to the default contact form) in my [color="#FF8C00"]themes/template/views/layouts/main.php[/color].

I copied the site/contact form from:




But received a 404 error with the following url:

echo Yii::app()->createURL('site/contact2'); 

The system is unable to find the requested action "contact2".

I then moved the new page to:


In my SiteController file, in the actions() function I have:




I tried the following:


But got redirected back to ‘userGroups’.

I then tried:


But received a ‘The requested view “index” was not found’ 404 error.

My urlManager in config/main.php has the following:







I’ve had a look at these pages:

But I can only assume everything is being redirected through userGroups somehow and bypassing the standard rules.

Can anyone point me in the right direction?

Advice greatly appreciated :slight_smile:


Never mind, I’ve worked it out…

SiteController must have a function called:

	public function actionContact2()





In file "SiteController.php" you make will add new method "actionContact2"

public function actionContact2()