Skip to content

Commit

Permalink
Use template directory for loading components
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b authored Jul 7, 2017
1 parent e964e01 commit 7c7617b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dom/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ public function tidy() {
* introduced.
*/
public function loadComponents() {
$componentDirectory = Path::get(Path::COMPONENT);
$templateDirectory = Path::get(Path::TEMPLATE);
$xpath = new \DOMXPath($this->domDocument);
$customNodeList = $xpath->query("//*[contains(name(), '-')]");
for($i = 0; $i < $customNodeList->length; $i++) {
$node = $customNodeList->item($i);
$componentHtmlFile = implode("/", [
$componentDirectory,
$templateDirectory,
$node->tagName . ".html",
]);
if(!is_file($componentHtmlFile)) {
Expand Down

0 comments on commit 7c7617b

Please sign in to comment.