Comments (6)
I have never tried using the HMVC, only Matchbox and Modular Separation. If it works the same way as those, and I believe it does, the change should be a simple one. And that change should only be needed if you are using the themes feature of Ocular.
In HMVC's MY_Loader file (I'm assuming it has one, that's how the others work....) check to see if it overrides the _ci_load() method. If it does, you will need to integrate a very small change that I implemented in that method that simply checks to see if Ocular is loaded and, if so, returns false when a view file is not found.
Ocular, itself, uses $this->load->view() exclusively to render views so that it would be as compatible as possible with third party HMVC-type plugins.
There may be more to it then that, I can't say. :) But that should theoretically be all that is needed. It all depends on how the HMVC library works.
I'd love to hear if you get it working and what changes you made to make that happen. If you want to fork the code and implement a change there, send a pull request and I'll include it in the official repo.
from ocular-template-library.
Thanks for the help. Ocular loads but it looks for the view at the wrong place :
Current View = ../modules/welcome/controllers/welcome/index
Instead of ../modules/welcome/views/welcome/index
The result is an error (header already sent by Template.php)
Do you have an idea?
from ocular-template-library.
I do have one idea, but it might cause a problem if you're using controllers within those modules that are in subfolders, like module/module_name/controllers/admin/controller.php. If you're not doing that, you can try the following fix:
On line 237 of the latest version, remove the directory call, so it should go from this:
$this->current_view = $this->ci->router->directory . $this->ci->router->class . '/' . $this->ci->router->method;
to this:
$this->current_view = $this->ci->router->class . '/' . $this->ci->router->method;
from ocular-template-library.
It didn't work, but I put (and it worked):
$this->current_view = '../views/' . $this->ci->router->class . '/' . $this->ci->router->method;
Is there a way to do it in a cleaner way though?
from ocular-template-library.
And why do you echo the view path? I don't get it and I don't see any config variable for dev/prod env that would turn it off. What is it made for?
Thank you for you help!
from ocular-template-library.
I'm not sure of a cleaner way to do it then what you have there. If it's working for this project, then great! :)
As for echoing the view path... my bad. I was trying to debug something and forgot to delete it before uploading. Feel free to rip it out of there.
from ocular-template-library.
Related Issues (20)
- Current View Name Always Displayed HOT 1
- AJAX Layout Not Working HOT 1
- Block's Don't Accept Data from the View HOT 3
- echoing Current View HOT 1
- active_theme
- Session load to use message()
- render helper
- set_message() not clearing
- AJAX layouts not correct in repo
- themed_view()
- 500 Internal Server Error when Template library wants to load config file
- Return layout/view as string rather than render to screen HOT 1
- yield() method conflicts with PHP 5.5+ "yield" keyword HOT 2
- viewing not in the right way... HOT 1
- $bypass always set to FALSE ? HOT 3
- view content echoed before layout content HOT 1
- Controllers in sub-folders HOT 1
- Pass array directly to template->set HOT 2
- Not reverting view loads to default theme. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocular-template-library.