Welcome Guest, Not a member yet? Register   Sign In
Run another controller's method
#9

[eluser]Sam Dark[/eluser]
Sorry for not replying for a while.

jbowman is right: I'm trying to implement potal-like View library so it will be able to handle something like this:

Code:
<html>
  ...
  <body>
    <div class="sidemenu">
      <h2>Recent posts</h2>
      &lt;?=call_controller('blog', 'recent', array('count' => 10))?&gt;
      <h2>Recent comments</h2>
      &lt;?=call_controller('comments', 'recent', array('count' => 10))?&gt;
    </div>
    <div class="content">
      &lt;?=$content?&gt;
    </div>
  &lt;/body&gt;
&lt;/html&gt;

Calling blog controller's recent action with an array of options and returning output.

Why I don't want to implement those recent posts/blog as library?

1. I don't want to write and load library for each of these blocks.
2. I want to use controller's output on it's own page also.


Messages In This Thread
Run another controller's method - by El Forum - 02-13-2008, 03:50 AM
Run another controller's method - by El Forum - 02-13-2008, 06:01 AM
Run another controller's method - by El Forum - 02-13-2008, 07:00 AM
Run another controller's method - by El Forum - 02-13-2008, 07:03 AM
Run another controller's method - by El Forum - 02-13-2008, 10:50 AM
Run another controller's method - by El Forum - 02-13-2008, 11:02 AM
Run another controller's method - by El Forum - 02-13-2008, 10:18 PM
Run another controller's method - by El Forum - 02-13-2008, 11:23 PM
Run another controller's method - by El Forum - 02-15-2008, 11:34 AM
Run another controller's method - by El Forum - 02-15-2008, 11:51 AM
Run another controller's method - by El Forum - 02-15-2008, 02:53 PM
Run another controller's method - by El Forum - 02-15-2008, 03:01 PM
Run another controller's method - by El Forum - 02-15-2008, 06:42 PM
Run another controller's method - by El Forum - 02-15-2008, 08:30 PM
Run another controller's method - by El Forum - 02-15-2008, 08:34 PM
Run another controller's method - by El Forum - 02-15-2008, 10:24 PM
Run another controller's method - by El Forum - 02-16-2008, 06:44 AM
Run another controller's method - by El Forum - 05-19-2009, 09:49 AM
Run another controller's method - by El Forum - 05-19-2009, 10:14 AM
Run another controller's method - by El Forum - 05-19-2009, 07:28 PM
Run another controller's method - by El Forum - 05-20-2009, 02:09 AM
Run another controller's method - by El Forum - 05-20-2009, 02:10 AM
Run another controller's method - by El Forum - 05-20-2009, 02:35 AM
Run another controller's method - by El Forum - 05-20-2009, 09:19 AM
Run another controller's method - by El Forum - 07-03-2010, 06:51 PM
Run another controller's method - by El Forum - 07-04-2010, 08:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB