How can you include a javascript menu throughout the site. Give steps.
Answer Posted / Sabhajeet Sonkar
To include a JavaScript menu throughout your CakePHP site, follow these steps:
1. Create or download your JavaScript menu file (e.g., menu.js) and place it in the webroot/js directory.
2. In your layout file (e.g., default.ctp), add the following line to include the script: <script src='/js/menu.js'></script>
3. Make sure that your layout file is being used by all views by setting it as the default layout in AppController.php.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category