开发者

CakePHP How to call command that was calling from different file before?

I'm again lost with CakePHP.

Before site was using "static" one page invite for users from twitter, and now, I want all of those on one page. I menage to create it for Facebook, but I can't for twitter.

I find controller file, it's the same for both, routes.php is redirecting on same way for both, I find file that is rendering in this command, but when I try to use:

$this->renderElement('fetch_twitter_contact');

It get's it all wrong. And if it's called from original file it's all working okay.

I checked original file and it doesn't have anything different than this new have ( no special commands in front ), but still something is different.

Can someone tell me what else is deciding which codes will be run if file name is different?

How can I turn same functions to work in new file like it was working in old one?

New file have name index.ctp, and old one had social_contacts.ctp

New link is friend_invites/ and old one had friend_开发者_如何转开发invites/social_contacts ( or friend_invites/social_contacts?contect=twitter )

It's 6AM here, and I'm still busting me head off with this.

Please help.


Your question is very difficult to understand. I suggest you get some sleep and clean up the question a bit so we can help :)

From what I understand, you're trying to call fetch_twitter_contact from two different views, but it only work from 1 view? Is this the problem?

Please go through this list and update your question

  1. Have you set debug to 2 in core.php? If not, please do it

  2. Are you getting any error messages? Post them in this question

  3. Where is the element stored? In the elements folder or in a different folder inside the view folder?

  4. It get's it all wrong. What does this mean? What goes wrong? What do you expect to happen?

  5. Can you post the FULL url and associated views you are trying to use?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜