Skip to content

Commit 41b426e

Browse files
committed
Updating to allow for extra view directories
1 parent 1c530c8 commit 41b426e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/services/Utility/CoreView.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ public function makeView()
114114

115115
public function checkView($view)
116116
{
117-
// ppd($view);
118-
if (View::exists($view) || View::exists('core::'. $view)) {
117+
if (View::exists($view) || View::exists('core::'. $view) || View::exists('chat::'. $view) || View::exists('forum::'. $view)) {
119118
return true;
120119
}
121120

src/services/View/Environment.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,19 @@ class Environment extends BaseEnvironment {
1717
public function make($view, $data = array(), $mergeData = array())
1818
{
1919
if (!$this->exists($view)) {
20-
$view = 'core::'. $view;
20+
$coreView = 'core::'. $view;
21+
$chatView = 'chat::'. $view;
22+
$forumView = 'forum::'. $view;
23+
24+
if ($this->exists($coreView)) {
25+
$view = $coreView;
26+
} elseif ($this->exists($chatView)) {
27+
$view = $chatView;
28+
} elseif ($this->exists($forumView)) {
29+
$view = $forumView;
30+
}
2131
}
32+
2233
$path = $this->finder->find($view);
2334

2435
$data = array_merge($mergeData, $this->parseData($data));

0 commit comments

Comments
 (0)