Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorspykid
     

    I am having a silly problem while getting values from another controller, suppose I have a sidebar in my page showing categories coming from category controller but now when I call my page from any other controller other than category it fails to display the categories. so right now I am using AJAX to get the categories in all other page but is there any other way to get this done...

    Thanks Rakesh

    • CommentAuthorspykid
     

    It looks this forum is dead...

    • CommentAuthorinsanet
     
    "I am having a silly problem while getting values from another controller"
    how are you passing this values? after a redirectTo, after a POST, by Session? by AJAX ? from whitin a controller calling other controller?

    how are you displaying your "side bar" list ? are they generated by a helper? and if not they should be.

    what do you mean with "i call my page" ? specify.
    • CommentAuthordemaio
     

    Sessions are not a bad idea ... I think, it is a matter of design sometimes as well... Controllers should be reponsible for certain 'subjects' , this way you can avoid passing data from controller to controller. How would you pass data between consecutive page reloads using plain PHP ? I assume, you would use sessions as one of options for this purpose. I would not rely upon Ajax, people do switch javascript off sometimes ...

    Akelos is plain PHP with patterns in it ... check http://www.fluffycat.com/PHP-Design-Patterns/ if you haven't been there yet ... You will find some of those patterns in akelos code ...

    I guess you have checked you options as regards your problem in the context of Rails, if not i recommend doing it ... Rails documentation is much more comprehensive than this here ...

    Best regards Demaio

    • CommentAuthorspykid
     

    Hey thanks guys, the side bar is not generated by helper, actually it is in the main layout or I should rather say that right now I am having a div placed in the main layout which get updated through AJAX call but now I want to remove those AJAX calls as it is slowing down my render time...

    Also thanks for pointing me to that session thing I think it will be a good idea....

    Thanks insanet and demaio