Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- modified get_path() method to handle csv layout

  • Loading branch information...
commit 0ebcd081332357469bd70af16c2dcd805b41e117 1 parent 5a54a29
Tetsuto authored
Showing with 13 additions and 6 deletions.
  1. +13 −6 classlib/Controller.php
View
19 classlib/Controller.php
@@ -53,12 +53,6 @@ protected function get_path($action_type, $custom_action_string = NULL, $options
{
$extension = "php";
- if(isset($options['layout'])) {
- if($options['layout'] == 'lightbox') {
- $extension = "ltbx";
- }
- }
-
if($custom_action_string) {
$action_string = $custom_action_string;
}
@@ -66,6 +60,19 @@ protected function get_path($action_type, $custom_action_string = NULL, $options
$action_string = $this->action_strings[$action_type];
}
+ if(isset($options['layout'])) {
+ if($options['layout'] == 'lightbox') {
+ $extension = "ltbx";
+ }
+ /**
+ * CSV template filename pattern: xyz.csv.php
+ */
+ else if($options['layout'] == 'csv')
+ {
+ $extension = "csv.{$extension}";
+ }
+ }
+
$path = PATH_PAGES . "{$this->directory_name}/{$action_string}.{$extension}";
if (file_exists($path))
Please sign in to comment.
Something went wrong with that request. Please try again.