Welcome Guest, Not a member yet? Register   Sign In
Your Opinion on my view library
#3

[eluser]KeyStroke[/eluser]
I don't know what your "action"s here are, but I do know that you're using so many unneccessary functions in the Display class. Why not just code one functions that is flexible and does all the work. Instead of setting each variable in a "display_actionX" function, just set an array like this:
Code:
$data['title'] = "title action 1";
    $data['keywords'] = 'keywords1, words1';
    $data['description'] = 'description 1';
    $data['page'] = 'action1';

Then send that array to a single "display_action" which would look something like this:
Code:
function display_action($data)
{
$this->_output($data);
}

This way you don't have to edit all "display_actionX" functions if you some time decide you need to add more data to the page.

I think it would be more helpful if we show us the actual code though.


Messages In This Thread
Your Opinion on my view library - by El Forum - 04-23-2008, 07:14 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:21 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:37 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 07:39 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:17 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 08:51 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:31 AM
Your Opinion on my view library - by El Forum - 04-23-2008, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB