Welcome Guest, Not a member yet? Register   Sign In
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS

[eluser]Phil Sturgeon[/eluser]
[quote author="bdegier" date="1260045118"]This works but i'm not sure if this is the clean way of doing it:
Code:
<? if (is_module('shoppingcart')): ?>
<?= $this->load->module_view('shoppingcart', 'cart_index_view'); ?>
<? endif; ?>
[/quote]

is_module is deprecated, use module_exists instead.

As for showing a layout, is this a normal "I have built a page and want to wrap the header and footer" sort of thing? If so, in your controller use the Layout library instead of worrying about anything in the view.

Code:
$this->layout->title('Something')->create('viewfile', $this->data);

The title() method is optional, it will guess based on controller and method names if nothing is provided.

You're gonna hate me but v0.9.8 will change how modules work quite a lot, BUT v0.9.8 will have module builders documentation so at least that's something...


Messages In This Thread
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS - by El Forum - 12-08-2009, 06:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB