I just check for empty data and switch out part of the view. Much like the code sample Ceryl supplied.
For more advanced use you can go all the way to using a status field in your database. An example, still from my file manager, User hbtm File can be used to figure out if a user has "seen" a file before or if it is new. Each time a file is displayed to a user an association is created indicating the file has been seen by this user. Each load of a list of files does a check and formats data for the view so it can know which files to indicate as new. The trick here is to do this kind of thing without slowing your application down to a crawl. I had to do a lot of trickery to be able to handle a few thousand files in a folder without slowing down or even running out of memory (using recursive = out of memory). For your situation you might use a field (fields) in the User model to determine if it is the first time a user has activated a feature. Most of the time the smart thing is to write the copy cleverly so it works for both first-time and "I just erased everything" situations. On Oct 12, 6:28 pm, DigitalDude <[email protected]> wrote: > @Ceryl: > > yeah I did a little test-view and I think you're right, when you have > a lot of different pages where empty data can occur, there would be > many elements. So I tried to check the data within the view and > displayed a certain div-container when the data-array was empty. It > works without any problems. > > @Martin: > This is exactly what I meant. First run information should be given to > the user, after the user registers and "sees" a function or category > for the first time. How did you implement that? Do you check if the > data is empty within the view? What other ways could we go to achieve > the desired behaviour? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
