I can't seem to get any of my links to work, is there a specific location where I need to setup links in the controller or config? Thanks in advance for your help.
<div class='header'>
<ul class='menu'>
<li><a href='".$this->createUrl('site/index')."'>home</a></li>
<li><a href='".$this->createUrl('site/price_quote')."'>price quote!</a></li>
<li><a href='".$this->createUrl('site/services')."'>services</a></li>
<li><a href='".$this->createUrl('site/faq')."'>FAQ</a></li>
<li><a href='".$this->createUrl('site/portfolio')."'>portfolio</a></li>
<li><a href='".$this->createUrl('site/contact')."'>contact</a></li>
</ul>
</div>
qiang
(Qiang Xue)
January 11, 2009, 1:24am
2
What is the generated HTML code?
And what is the URL for index.php?
Thanks for the quick reply, index link works, and the generated login.php works if i go to site/login. Portfolio, however, does not.
Quote
The system is unable to find the requested action "portfolio".
<div class='header'>
<ul class='menu'>
<li><a href='/VStudios_Yii/index.php?r=site/index'>home</a></li>
<li><a href='/VStudios_Yii/index.php?r=site/price_quote'>price quote!</a></li>
<li><a href='/VStudios_Yii/index.php?r=site/services'>services</a></li>
<li><a href='/VStudios_Yii/index.php?r=site/faq'>FAQ</a></li>
<li><a href='/VStudios_Yii/index.php?r=site/portfolio'>portfolio</a></li>
<li><a href='/VStudios_Yii/index.php?r=site/contact'>contact</a></li>
</ul>
</div>
Quote
\protected\views\site\index.php
qiang
(Qiang Xue)
January 11, 2009, 1:40am
4
Do you have actionPortfolio method in your SiteController??
big thanks, fixed… so you use reflection to find the method to call?
/**
* render portfolio
*
*/
public function actionPortfolio()
{
$this->render('portfolio');
}
qiang
(Qiang Xue)
January 11, 2009, 1:57am
6
Nope. A simple method_exists() call.