Example #1
0
function nc_get_path_to_main_parent_folder($path)
{
    $folder_array = get_folder_array($path);
    while (+$folder_array[count($folder_array) - 2]) {
        $path = nc_get_path_to_parent_folder($path);
        $folder_array = explode('/', rtrim(nc_standardize_path_to_folder($path), '/'));
    }
    return nc_standardize_path_to_folder(join('/', $folder_array));
}
Example #2
0
 public function get_parent_path($field)
 {
     return nc_get_path_to_parent_folder($this->template->absolute_path) . $field . $this->template->extension;
 }