Results 1 to 5 of 5

Thread: Need help with a project in CakePHP

  1. #1
    Join Date
    Sep 2010
    Posts
    19

    Need help with a project in CakePHP

    I contact you because I have big problem with one of my projects. This project is to create a website fully adjustable (CMS). Users have a template, page, modal and then Modules. Locations in the pages modal allowing users to display modules (text, video, sound, image etc. ...). I am a bit lost in CakePHP. I'll have a table modules let me know the module name to display. I hesitate between using elements (problem for the passage of data) or controllers, but this time, how to retrieve the result of View (without requestAction)? In short, can you help me find a solution to display the modules?

  2. #2
    Join Date
    Jan 2009
    Posts
    120

    Re: Need help with a project in CakePHP

    Everything depends on what needs to be displayed in your modules and modeling that you get. Does your example text block will have different fields as video, sound or image? Or in the end all modules contain HTML code generated in the creation (in which case there will be just one type of module to dynamically choose which item inserted)? Otherwise, what is certain is that you have something like:
    Page Location hasMany / belongsTo Location Module ... probably somewhere with a field "ItemName" which enables you to choose which element to display in your page, passing the necessary information.

  3. #3
    Join Date
    Apr 2009
    Posts
    102

    Browser does not update the pages

    Many times, it happens that your browser does not update the pages. If your browser does not update the pages when you navigate a cakephp project (perhaps from behind a proxy or some other situation) you have to do is add headers to tell clients that the web page can not be stored in the cache. This must not be confused with the internal cache cake I assume you already disabled. Once detected this, all you have to do with cakephp is added in app / appController.php (or somewhere else you want) a line that says:
    PHP Code:
    This -> disableCache (); 
    For example, if there was no function and are used helprs html form, might look like this:
    PHP Code:
    class AppController extends Controller {
         var $ 
    helpers = array ('Html''Form');

         
    beforeFilter function () {
             $ 
    This -> disableCache ();
         }
     } 

  4. #4
    Join Date
    Nov 2008
    Posts
    97

    Changing patterns or tables in CakePHP

    Just a reminder, if a change is made in the database, either the table name or something of the structure, do not forget to erase the cache (if enabled), but changes will not be to see. To clear the cache if it is configured as a standard distribution of CakePHP should clear what is in app / tmp / cache / models. To see if the cache is enabled and is configured as you have to look in app / config / core.php. If this line commented -
    // Configure:: write ('Cache.disable', true);
    Means that the cache is enabled. If the configuration of the cache line is well
    Code:
    Cache:: config ('default', array ('engine' => 'File'));

  5. #5
    Join Date
    Nov 2008
    Posts
    109

    Re: Need help with a project in CakePHP

    The models also have sustained of another class called a DataSource (Data Source). DataSources are an abstraction that enables models to manipulate dissimilar types of data constantly. While the main source of data in a CakePHP application is habitually a database, you can write additional DataSources that allow their models to correspond to RSS feeds, CSV files, LDAP entries, or iCal events. DataSources allow you to correlate records from diverse sources: rather than being limited to joints [joins] SQL, DataSources permit you to tell your LDAP model is connected to many iCal events. Just like controllers, models also include callbacks:
    • beforeFind ()
    • afterFind ()
    • beforeValidate ()
    • beforeSave ()
    • afterSave ()
    • beforeDelete ()
    • afterDelete ()

Similar Threads

  1. CakePHP vs. Ruby on Rails
    By pele1200 in forum Polls & Voting
    Replies: 9
    Last Post: 03-08-2012, 05:26 PM
  2. how to implement reusable Js File in CakePHP.
    By CakePHP_fresher in forum Software Development
    Replies: 1
    Last Post: 20-05-2012, 03:26 PM
  3. Links between models in CakePHP
    By Dante i in forum Software Development
    Replies: 4
    Last Post: 05-01-2011, 07:43 AM
  4. How to get id of another model in CakePHP?
    By Iker in forum Software Development
    Replies: 4
    Last Post: 05-01-2011, 04:48 AM
  5. What are basic Principles of CakePHP?
    By Xanty in forum Software Development
    Replies: 6
    Last Post: 04-01-2011, 11:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,066,804.52223 seconds with 17 queries