Page 1 of 1

Download title instead of filename

Posted: 05 Jan 2009, 17:01
by leewilson78
Hi all,

Is it possible to have the download link the title of the file, instead of the filename?

Thanks

SOLVED

Posted: 05 Jan 2009, 17:25
by leewilson78
Solved it, open up: components/com_phocadownload/views/category/tmpl/default.php

Change the following:

Code: Select all

// Title or name
			
			if ($this->paramstmpl['filename_or_name'] == 'title') {
				$displayNameHead = '';
				$displayName = $valueDoc->title;
			} else if ($this->paramstmpl['filename_or_name'] == 'filename'){
				$displayNameHead = '';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			} else if ($this->paramstmpl['filename_or_name'] == 'filenametitle'){
				$displayNameHead = '<div><strong>'.$valueDoc->title.'</strong></div>';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			}
to:

Code: Select all

// Title or name
			
			if ($this->paramstmpl['filename_or_name'] == 'filename') {
				$displayNameHead = '';
				$displayName = $valueDoc->title;
			} else if ($this->paramstmpl['filename_or_name'] == 'title'){
				$displayNameHead = '';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			} else if ($this->paramstmpl['filename_or_name'] == 'filenametitle'){
				$displayNameHead = '<div><strong>'.$valueDoc->title.'</strong></div>';
				$displayName = PhocaDownloadHelper::getTitleFromFilenameWithExt( $valueDoc->filename );
			}
Looks like this should be an option somewhere, I couldn't find it though.

Re: Download title instead of filename

Posted: 06 Jan 2009, 00:08
by Jan
yes it is in paramters - File Name or Name

Jan

Re: Download title instead of filename

Posted: 20 Jun 2010, 03:59
by QldFirey
Where are the Paramters?

Thanks, Chris.

Re: Download title instead of filename

Posted: 20 Jun 2010, 13:50
by Jan