Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Small change to Zepto\Helper::link_for()
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Feb 13, 2014
1 parent 48cbed7 commit 0ed77b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/Zepto/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,16 @@ public function link_for($file_name)
// Check if file exists
try {
$content = $this->app['content_loader']->load($file_name);

// Get file title and URL and return
$link = $content[$file_name]['meta']['title'];
$url = $this->url_for($file_name);
return sprintf('<a href="%s"> ' . $link . ' </a>', $url);
}
catch (\Exception $e) {
$this->app['router']->error($e);
}

// Get file title and URL and return
$link = $content[$file_name]['meta']['title'];
$url = $this->url_for($file_name);
return sprintf('<a href="%s"> ' . $link . ' </a>', $url);
}

}

0 comments on commit 0ed77b4

Please sign in to comment.