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

[eluser]bdegier[/eluser]
I'm running into some problems trying to develop a shoppingcart module for my application.

I've made a folder "shoppingcart" in the modules folder and wrote a controller and view. Now when i go to http://localhost/pyrocms/shoppingcart i get served my view nicely but how do I implement this in my layout?

I've stolen some code from the index page which loads the news module:

Code:
<?php if(module_exists('shoppingcart')): ?>
<?= $this->Shoppingcart->index(); ?>
<? endif; ?>

But this throws me the following error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Loader::$Shoppingcart

Filename: layouts/shoppingcart-page.php

Line Number: 46

Fatal error: Call to a member function index() on a non-object in C:\xampp\htdocs\pyrocms\application\themes\Bento\views\layouts\shoppingcart-page.php on line 46

So i tried the dirty method: Instead of including the module in one of the pages i placed the whole layout in the module view and then got this error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined variable: theme_view_folder

Filename: views/cart.php

Line Number: 73
An Error Was Encountered

Unable to load the requested file: metadata.php


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



Theme © iAndrew 2016 - Forum software by © MyBB