|
@@ 91-98 (lines=8) @@
|
| 88 |
|
|
| 89 |
|
$file = get_template_directory() . '/controllers/single/' . strtolower($this->context['post']->post_type) . '.php'; |
| 90 |
|
|
| 91 |
|
if (file_exists($file)) { |
| 92 |
|
/** |
| 93 |
|
* Set context for included file |
| 94 |
|
*/ |
| 95 |
|
include($file); |
| 96 |
|
} else { |
| 97 |
|
Timber::render(array('single-' . $context['post']->ID . '.twig', 'single-' . $context['post']->post_type . '.twig', 'single.twig'), $context, Cache::getTimerTime()); |
| 98 |
|
} |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
public function search() |
|
@@ 129-136 (lines=8) @@
|
| 126 |
|
$file = get_template_directory() . '/controllers/archive/' . strtolower($this->context['post']->title) . '.php'; |
| 127 |
|
} |
| 128 |
|
|
| 129 |
|
if (file_exists($file)) { |
| 130 |
|
/** |
| 131 |
|
* Set context for included file |
| 132 |
|
*/ |
| 133 |
|
include($file); |
| 134 |
|
} else { |
| 135 |
|
Timber::render(array('single-' . $context['post']->ID . '.twig', 'single-' . $context['post']->post_type . '.twig', 'single.twig'), $context, Cache::getTimerTime()); |
| 136 |
|
} |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public function page() |