Is it correct to put the Javascript helper in page_controllers.php? It seems that's the only way to get the helper loaded and available to home.ctp and default.ctp layout.
On Nov 7, 10:24 am, Bernardo Vieira <[EMAIL PROTECTED]> wrote: > Do you have the Javascript helper on whatever controller you're using? > > Ed Drain wrote: > > I get the following error: > > Line 31 is the one with the javascript->link part. > > > Whats wrong with this? > > > *Notice* (8) <javascript:void(0);>: Undefined variable: javascript > > [*CORE\cake\libs\view\layouts\default.ctp*, line *31*] > > > Code <javascript:void(0);> | Context <javascript:void(0);> > > $___viewFn = > > "C:\wamp\www\gradebook\cake\libs\view\layouts\default.ctp" > > $___dataForView = array( > > "page" => "home", > > "subpage" => null, > > "title_for_layout" => "Home", > > "content_for_layout" => "<h2>Release Notes for CakePHP 1.2.0.7296 > > RC2.</h2> > > <a href="https://trac.cakephp.org/wiki/notes/1.2.x.x">Read the release > > notes and get the latest version </a> > > <p> > > <span class="notice success">Your tmp directory is writable.</span></p> > > <p> > > <span class="notice success">The <em>FileEngine</em> is being used for > > caching. To change the config edit APP/config/core.php </span></p> > > <p> > > <span class="notice success">Your database configuration file is > > present.</span></p> > > <p> > > <span class="notice success">Cake is able to connect to the > > database.</span></p> > > <h3>Editing this Page</h3> > > <p> > > To change the content of this page, edit: APP/views/pages/home.ctp.<br /> > > To change its layout, edit: APP/views/layouts/default.ctp.<br /> > > You can also add some CSS styles for your pages at: APP/webroot/css.</p> > > <h3>Getting Started</h3> > > <p> > > <a href="http://book.cakephp.org"><strong>new</strong> CakePHP 1.2 > > Docs</a> > > <a href="http://book.cakephp.org/view/219/the-cakephp-blog-tutorial">The > > 15 min Blog Tutorial</a><br /> > > </p> > > <h3>More about Cake</h3> > > <p> > > CakePHP is a rapid development framework for PHP which uses commonly known > > design patterns like Active Record, Association Data Mapping, Front > > Controller and MVC.</p> > > <p> > > Our primary goal is to provide a structured framework that enables PHP > > users at all levels to rapidly develop robust web applications, without any > > loss to flexibility.</p> > > <br /> > > <ul> > > <li><a href="http://www.cakefoundation.org/">Cake Software Foundation > > </a> > > <ul><li>Promoting development related to CakePHP</li></ul></li> > > <li><a href="http://live.cakephp.org">The Show </a> > > <ul><li>The Show is a weekly live internet radio broadcast where we > > discuss CakePHP-related topics and answer questions live via IRC, Skype, > > and telephone.</li></ul></li> > > <li><a href="http://bakery.cakephp.org">The Bakery </a> > > <ul><li>Everything CakePHP</li></ul></li> > > <li><a href="http://astore.amazon.com/cakesoftwaref-20/">Book Store </a> > > <ul><li>Recommended Software Books</li></ul></li> > > <li><a href="http://www.cafepress.com/cakefoundation">CakeSchwag </a> > > <ul><li>Get your own CakePHP gear - Doughnate to Cake</li></ul></li> > > <li><a href="http://www.cakephp.org">CakePHP </a> > > <ul><li>The Rapid Development Framework</li></ul></li> > > <li><a href="http://manual.cakephp.org">CakePHP Manual </a> > > <ul><li>Your Rapid Development Cookbook</li></ul></li> > > <li><a href="http://api.cakephp.org">CakePHP API </a> > > <ul><li>Docblock Your Best Friend</li></ul></li> > > <li><a href="http://www.cakeforge.org">CakeForge </a> > > <ul><li>Open Development for CakePHP</li></ul></li> > > <li><a href="https://trac.cakephp.org/">CakePHP Trac </a> > > <ul><li>For the Development of CakePHP (Tickets, SVN browser, Roadmap, > > Changelogs)</li></ul></li> > > <li><a href="http://groups-beta.google.com/group/cake-php">CakePHP > > Google Group </a> > > <ul><li>Community mailing list</li></ul></li> > > <li><a href="irc://irc.freenode.net/cakephp > > <http://irc.freenode.net/cakephp>">irc.freenode.net > > <http://irc.freenode.net> #cakephp</a> > > <ul><li>Live chat about CakePHP</li></ul></li> > > </ul>", > > "scripts_for_layout" => "", > > "cakeDebug" => "", > > "html" => HtmlHelper > > HtmlHelper::$tags = array > > HtmlHelper::$base = "/gradebook" > > HtmlHelper::$here = "/gradebook/" > > HtmlHelper::$params = array > > HtmlHelper::$action = "display" > > HtmlHelper::$data = NULL > > HtmlHelper::$_crumbs = array > > HtmlHelper::$__docTypes = array > > HtmlHelper::$helpers = NULL > > HtmlHelper::$webroot = "/gradebook/" > > HtmlHelper::$themeWeb = NULL > > HtmlHelper::$plugin = NULL > > HtmlHelper::$namedArgs = NULL > > HtmlHelper::$argSeparator = NULL > > HtmlHelper::$validationErrors = NULL > > HtmlHelper::$__tainted = NULL > > HtmlHelper::$__cleaned = NULL > > HtmlHelper::$_log = NULL, > > "form" => FormHelper > > FormHelper::$helpers = array > > FormHelper::$fieldset = array > > FormHelper::$__options = array > > FormHelper::$fields = array > > FormHelper::$requestType = NULL > > FormHelper::$base = "/gradebook" > > FormHelper::$webroot = "/gradebook/" > > FormHelper::$themeWeb = NULL > > FormHelper::$here = "/gradebook/" > > FormHelper::$params = array > > FormHelper::$action = "display" > > FormHelper::$plugin = NULL > > FormHelper::$data = NULL > > FormHelper::$namedArgs = NULL > > FormHelper::$argSeparator = NULL > > FormHelper::$validationErrors = NULL > > FormHelper::$tags = array > > FormHelper::$__tainted = NULL > > FormHelper::$__cleaned = NULL > > FormHelper::$_log = NULL > > FormHelper::$Html = HtmlHelper object, > > "session" => SessionHelper > > SessionHelper::$helpers = NULL > > SessionHelper::$__active = true > > SessionHelper::$valid = false > > SessionHelper::$error = false > > SessionHelper::$_userAgent = "a2362dcd11119bb3c058613d3afcad31" > > SessionHelper::$path = "/" > > SessionHelper::$lastError = NULL > > SessionHelper::$security = NULL > > SessionHelper::$time = 1226074348 > > SessionHelper::$sessionTime = false > > SessionHelper::$watchKeys = array > > SessionHelper::$id = NULL > > SessionHelper::$_log = NULL > > SessionHelper::$base = "/gradebook" > > SessionHelper::$webroot = "/gradebook/" > > SessionHelper::$here = "/gradebook/" > > SessionHelper::$params = array > > SessionHelper::$action = "display" > > SessionHelper::$data = NULL > > SessionHelper::$themeWeb = NULL > > SessionHelper::$plugin = NULL > > ) > > $loadHelpers = false > > $cached = true > > $loadedHelpers = array() > > $page = "home" > > $subpage = null > > $title_for_layout = "Home" > > $content_for_layout = "<h2>Release Notes for CakePHP > > 1.2.0.7296 RC2.</h2> > > <a href="https://trac.cakephp.org/wiki/notes/1.2.x.x">Read the release > > notes and get the latest version </a> > > <p> > > <span class="notice success">Your tmp directory is writable.</span></p> > > <p> > > <span class="notice success">The <em>FileEngine</em> is being used for > > caching. To change the config edit APP/config/core.php </span></p> > > <p> > > <span class="notice success">Your database configuration file is > > present.</span></p> > > <p> > > <span class="notice success">Cake is able to connect to the > > database.</span></p> > > <h3>Editing this Page</h3> > > <p> > > To change the content of this page, edit: APP/views/pages/home.ctp.<br /> > > To change its layout, edit: APP/views/layouts/default.ctp.<br /> > > You can also add some CSS styles for your pages at: APP/webroot/css.</p> > > <h3>Getting Started</h3> > > <p> > > <a href="http://book.cakephp.org"><strong>new</strong> CakePHP 1.2 > > Docs</a> > > <a href="http://book.cakephp.org/view/219/the-cakephp-blog-tutorial">The > > 15 min Blog Tutorial</a><br /> > > </p> > > <h3>More about Cake</h3> > > <p> > > CakePHP is a rapid development framework for PHP which uses commonly known > > design patterns like Active Record, Association Data Mapping, Front > > Controller and MVC.</p> > > <p> > > Our primary goal is to provide a structured framework that enables PHP > > users at all levels to rapidly develop robust web applications, without any > > loss to flexibility.</p> > > <br /> > > <ul> > > <li><a href="http://www.cakefoundation.org/">Cake Software Foundation > > </a> > > <ul><li>Promoting development related to CakePHP</li></ul></li> > > <li><a href="http://live.cakephp.org">The Show </a> > > <ul><li>The Show is a weekly live internet radio broadcast where we > > discuss CakePHP-related topics and answer questions live via IRC, Skype, > > and telephone.</li></ul></li> > > <li><a href="http://bakery.cakephp.org">The Bakery </a> > > <ul><li>Everything CakePHP</li></ul></li> > > <li><a href="http://astore.amazon.com/cakesoftwaref-20/">Book Store </a> > > <ul><li>Recommended Software Books</li></ul></li> > > <li><a href="http://www.cafepress.com/cakefoundation">CakeSchwag </a> > > <ul><li>Get your own CakePHP gear - Doughnate to Cake</li></ul></li> > > <li><a href="http://www.cakephp.org">CakePHP </a> > > <ul><li>The Rapid Development Framework</li></ul></li> > > <li><a href="http://manual.cakephp.org">CakePHP Manual </a> > > <ul><li>Your Rapid Development Cookbook</li></ul></li> > > <li><a href="http://api.cakephp.org">CakePHP API </a> > > <ul><li>Docblock Your Best Friend</li></ul></li> > > <li><a href="http://www.cakeforge.org">CakeForge </a> > > <ul><li>Open Development for CakePHP</li></ul></li> > > <li><a href="https://trac.cakephp.org/">CakePHP Trac </a> > > <ul><li>For the Development of CakePHP (Tickets, SVN browser, Roadmap, > > Changelogs)</li></ul></li> > > <li><a href="http://groups-beta.google.com/group/cake-php">CakePHP > > Google Group </a> > > <ul><li>Community mailing list</li></ul></li> > > <li><a href="irc://irc.freenode.net/cakephp > > <http://irc.freenode.net/cakephp>">irc.freenode.net > > <http://irc.freenode.net> #cakephp</a> > > <ul><li>Live chat about CakePHP</li></ul></li> > > </ul>" > > $scripts_for_layout = "" > > $cakeDebug = "" > > $html = HtmlHelper > > HtmlHelper::$tags = array > > HtmlHelper::$base = "/gradebook" > > HtmlHelper::$here = "/gradebook/" > > HtmlHelper::$params = array > > HtmlHelper::$action = "display" > > HtmlHelper::$data = NULL > > HtmlHelper::$_crumbs = array > > HtmlHelper::$__docTypes = array > > HtmlHelper::$helpers = NULL > > HtmlHelper::$webroot = "/gradebook/" > > HtmlHelper::$themeWeb = NULL > > HtmlHelper::$plugin = NULL > > HtmlHelper::$namedArgs = NULL > > HtmlHelper::$argSeparator = NULL > > HtmlHelper::$validationErrors = NULL > > HtmlHelper::$__tainted = NULL > > HtmlHelper::$__cleaned = NULL > > HtmlHelper::$_log = NULL > > $form = FormHelper > > FormHelper::$helpers = array > > FormHelper::$fieldset = array > > FormHelper::$__options = array > > FormHelper::$fields = > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---