Wednesday, October 2, 2013
Creating a bullet list view for the Tree tutorial
I've been at this for a while and I'm completely new to Cake PHP and full
stack web frameworks period.
I simply want to turn the tree data in the Tree tutorial here
<http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html> into a
nice HTML bullet list for learning purposes.
*I have the model*
<?php
class Category extends AppModel {
public $actsAs = array('Tree');
}
?>
*I have the controller*
<?php
class CategoriesController extends AppController {
public function index() {
$data = $this->Category->generateTreeList(null, null, null,
' ');
}
}
?>
The view is whats missing.
I tried playing with the set method and adding it to the index action in the
CategoriesController hence assigning it a usable variable in the view.
Nothing seemed to work.
I'm hoping someone could direct me on the right track.
Thank you.
--
View this message in context: http://cakephp.1045679.n5.nabble.com/Creating-a-bullet-list-view-for-the-Tree-tutorial-tp5716765.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
stack web frameworks period.
I simply want to turn the tree data in the Tree tutorial here
<http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html> into a
nice HTML bullet list for learning purposes.
*I have the model*
<?php
class Category extends AppModel {
public $actsAs = array('Tree');
}
?>
*I have the controller*
<?php
class CategoriesController extends AppController {
public function index() {
$data = $this->Category->generateTreeList(null, null, null,
' ');
}
}
?>
The view is whats missing.
I tried playing with the set method and adding it to the index action in the
CategoriesController hence assigning it a usable variable in the view.
Nothing seemed to work.
I'm hoping someone could direct me on the right track.
Thank you.
--
View this message in context: http://cakephp.1045679.n5.nabble.com/Creating-a-bullet-list-view-for-the-Tree-tutorial-tp5716765.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
noobie problem with the cake blog tutorial
Hi guys,
Setup WAMP on my win8 laptop.
Installed cake
seemed to go OK.
Notes on my blog here
Tried the blog tutorial as detailed in http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
Have listed step by step what I did on my blog here
The jist is
From http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
"At this point, you should be able to point your browser to http://www.example.com/posts/index. You should see your view, correctly formatted with the title and table listing of the posts."
So I try
http://localhost/cake_2_0/posts/index ..... and get a page full of errors (See picture below.)
Missing Controller
PostsController could not be found.
Error: Create the class PostsController below in file app\Controller\PostsController.php
and I have that already in place (See picture below)
Suggestions and assistance welcome.
-- Setup WAMP on my win8 laptop.
Installed cake
seemed to go OK.
Notes on my blog here
Tried the blog tutorial as detailed in http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
Have listed step by step what I did on my blog here
The jist is
From http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
"At this point, you should be able to point your browser to http://www.example.com/posts/index. You should see your view, correctly formatted with the title and table listing of the posts."
So I try
http://localhost/cake_2_0/posts/index ..... and get a page full of errors (See picture below.)
Missing Controller
PostsController could not be found.
Error: Create the class PostsController below in file app\Controller\PostsController.php
and I have that already in place (See picture below)
Suggestions and assistance welcome.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Upload Plugin 2.0
How to rename the name of a file to send by Upload plugin 2.0?
grateful
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Paginator and multilingual routes
Hello.
I have a problem with paginator helper.
I'm developing an app in 2 language versions.
The app conatains among others blog, which is paginated.
Now, the url's in routes.php look for exmaple like this:
This is the route for blog search option.
Now, when I'm on a blog search results page, and I'm on the English version of website - everything works fine.
The URLs of pages look like "/blog/search/2", "/blog/search/3" etc.
But when I switch to German version, the paginator URLs are the same... and I want them to also be "translated" and look like: "/blog/suche/2", "/blog/suche/3", etc.
I guess it is because the '/blog/search/*' is defined first. When I remove that line from routes.php - the "/blog/suche/" links are in pagination.
How to fix this? In such way that in the german version, paginated links will also be german?
Regards and many thanks for help.
Anna
-- I have a problem with paginator helper.
I'm developing an app in 2 language versions.
The app conatains among others blog, which is paginated.
Now, the url's in routes.php look for exmaple like this:
Router::connect('/blog/search/*', array('controller' => 'blog_categories', 'action' => 'search'));
Router::connect('/blog/suche/*', array('controller' => 'blog_categories', 'action' => 'search'));
Router::connect('/blog/suche/*', array('controller' => 'blog_categories', 'action' => 'search'));
This is the route for blog search option.
Now, when I'm on a blog search results page, and I'm on the English version of website - everything works fine.
The URLs of pages look like "/blog/search/2", "/blog/search/3" etc.
But when I switch to German version, the paginator URLs are the same... and I want them to also be "translated" and look like: "/blog/suche/2", "/blog/suche/3", etc.
I guess it is because the '/blog/search/*' is defined first. When I remove that line from routes.php - the "/blog/suche/" links are in pagination.
How to fix this? In such way that in the german version, paginated links will also be german?
Regards and many thanks for help.
Anna
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Tuesday, October 1, 2013
Popular Posts | Stock Photography | SEO Consultants
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you do not wish to receive mail from us, please click here to unsubscribe .
Using Dispatcher Filters to setup site settings in plugin bootstrap
Hello,
-- I've decided to store site settings in db and then cache them. So I created Settings plugin with SettingsController, now my question is can I use (and how) Dispatcher Filters to setup site settings when plugin is loaded ? So after plugin is loaded I want to call setup method, which setups site settings using Configure::write().
Now Im doing this, this way ? Is that ok ?
Plugin bootstrap :
App::uses('SettingsController', 'Settings.Controller');
Configure::write('Dispatcher.filters', array(
'Settings.setup' => array('callable' => array(new SettingsController(), 'setup'), 'on' => 'before', 'priority' => 1)
));
How can i do it ?
Thanks for any help
Now Im doing this, this way ? Is that ok ?
Plugin bootstrap :
App::uses('SettingsController', 'Settings.Controller');
Configure::write('Dispatcher.filters', array(
'Settings.setup' => array('callable' => array(new SettingsController(), 'setup'), 'on' => 'before', 'priority' => 1)
));
How can i do it ?
Thanks for any help
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Sybase Database Driver for CakePHP 2.x - Is there any? Tips to develop one?
I would like to develop a CakePHP 2.4 app using a Sybase database.
There is not any Sybase database driver for CakePHP 2.x as I learned from the cookbook 2.0 and 2.4 api documentation Cake\Model\Datasource\Database so far.
Also Github cakephp/datasources branch 2.0 or 2.3 lists Database/Sybase as a Still Incompatible Datasource.
Is there any update on this?
In CakePHP 1.2 a Sybase Database Driver exists as described in api for class DboSybase
Is it a big thing to update the driver from the 1.2-driver as a template?
Is it better/easier to use MySQL DBO driver or any other db driver as a code template?
I learned that for database access a pdo extended datasources is the way which requires the PDO extensions.
Can provide anyone tips/support/teamwork how to develop and test such a driver?
Thanks
-- There is not any Sybase database driver for CakePHP 2.x as I learned from the cookbook 2.0 and 2.4 api documentation Cake\Model\Datasource\Database so far.
Also Github cakephp/datasources branch 2.0 or 2.3 lists Database/Sybase as a Still Incompatible Datasource.
Is there any update on this?
In CakePHP 1.2 a Sybase Database Driver exists as described in api for class DboSybase
Is it a big thing to update the driver from the 1.2-driver as a template?
Is it better/easier to use MySQL DBO driver or any other db driver as a code template?
I learned that for database access a pdo extended datasources is the way which requires the PDO extensions.
Can provide anyone tips/support/teamwork how to develop and test such a driver?
Thanks
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Posts (Atom)

