file block that opens to new tab? - RESOLVED
PermalinkI'm not yet very good with php but in view.php of the core block I see this...
<?php defined('C5_EXECUTE') or die("Access Denied.");
$f = $controller->getFileObject();
$fp = new Permissions($f);
if ($fp->canViewFile()) {
$c = Page::getCurrentPage();
if($c instanceof Page) {
$cID = $c->getCollectionID();
}
?>
Can I modify this code to produce the result I'm looking for and, if so, where do i copy the file to in the local directory to override the core files? Any help would be great.
<a href="<?php echo View::url('/download_file', $controller->getFileID(),$cID) ?>"><?php echo stripslashes($controller->getLinkText()) ?></a>
which I changed to...
<a href="<?php echo View::url('/download_file', $controller->getFileID(),$cID) ?>" target="_blank"><?php echo stripslashes($controller->getLinkText()) ?></a>
...then I copied the file into the /blocks file to override it.