IntelliSense not working in some files.
Posted: February 11th, 2013, 6:28 am
Hi there,
I am working on a CakePHP project and there seems to be no IntelliSense in some files. For example I have the following file:
index.ctp (I have mapped the .ctp file extension to PHP Editor in the VS options)
I can't goto definition on the link method. How can I get this to work?
Do I have to add a reference to the file that has the class with this method to the index.ctp somehow?
Some info regarding CakePHP:
You might have noticed the use of an object called $this->Html. This is an instance of the CakePHP HtmlHelper class. CakePHP comes with a set of view helpers that make things like linking, form output, JavaScript and Ajax a snap. You can learn more about how to use them in Helpers.
http://book.cakephp.org/2.0/en/views/helpers.html
I am using VS2012, on Windows 7 and all the above code is rendering correctly in the browser.
Regards,
Scott
I am working on a CakePHP project and there seems to be no IntelliSense in some files. For example I have the following file:
index.ctp (I have mapped the .ctp file extension to PHP Editor in the VS options)
- Code: Select all
<h1>Blog posts</h1>
<table>
<tr>
<th>Id</th>
<th>Title</th>
<th>Created</th>
</tr>
<!-- Here is where we loop through our $posts array, printing out post info -->
<?php foreach ($posts as $post): ?>
<tr>
<td><?php echo $post['Post']['id']; ?></td>
<td>
<?php echo $this->Html->link(
$post['Post']['title'],
array(
'controller' => 'posts',
'action' => 'view',
$post['Post']['id']
)
); ?>
</td>
<td><?php echo $post['Post']['created']; ?></td>
</tr>
<?php endforeach; ?>
<?php unset($post); ?>
</table>
I can't goto definition on the link method. How can I get this to work?
Do I have to add a reference to the file that has the class with this method to the index.ctp somehow?
Some info regarding CakePHP:
You might have noticed the use of an object called $this->Html. This is an instance of the CakePHP HtmlHelper class. CakePHP comes with a set of view helpers that make things like linking, form output, JavaScript and Ajax a snap. You can learn more about how to use them in Helpers.
http://book.cakephp.org/2.0/en/views/helpers.html
I am using VS2012, on Windows 7 and all the above code is rendering correctly in the browser.
Regards,
Scott