Hi, here is my case:
I wanna build a tiny site including a blog page and few other pages,
and I found that the official Blog module is perfect to use.
However, it has its own views, the default theme with many blocks and layout,
while I wanna use one layout design applied to all pages of my site,
and I've finished it in application/views/_layout and blocks like header footer.
Is it possible to use this layout instead of module own views?
Sorry for my poor eng, thx.
Comments
$this->load->module_view('app', '_layouts/main.php');
Where the "main.php" is the layout found in fuel/application/views/_layouts/main.php.Would u let me know how it works? I search the module_view and no any result.
Also, is it workable to modify $config['blog']['theme_path'] inside config\blog.php or something similar to achieve same purpose?
Blog is a module which can be accessed it as a page, but other modules can't, e.g. if i go localhost/fuel/validate, i'll be redirected to admin page, what's the difference between Blog and other?
Thx again.
There is a "theme_module" parameter you can set in that file to have it pull from a different module (e.g. "app" for the app folder).
With regards to using ajax to load the content, I suppose you could use the jQuery load ajax function and load it as a page fragment (this page talks about it http://api.jquery.com/load/).
$this->load->helper('ajax');
if (!is_ajax()) $output = $this->load->module_view($this->fuel_blog->settings('theme_module'), $view, $vars, TRUE);
else $output = $vars['body'];
Is this a bad way to work? Any better approach? Thx.