Page 1 of 1

How to remove the title from the images

Posted: 14 Jul 2010, 14:42
by klevis miho
How can I remove the title from the images (the title="" attribute)?
Because it gets the title from the image file name.

Re: How to remove the title from the images

Posted: 14 Jul 2010, 14:56
by imperialWicket
Strictly speaking, the html uses the Phoca Gallery Image Title field to populate the 'title' attribute - but this value defaults to the filename.

You can update the Title value to be something more appropriate in the Admin section under Phoca Gallery -> Images. If you just want to remove the title (assuming you are in Category view), the code is in /components/com_phocagallery/views/category/tmpl/default.php (around line 118), the original looks like:

Code: Select all

echo '<a class="'.$value->button->methodname.'"';
if ($value->type == 2) {
	if ($value->overlib == 0) {
		echo ' title="'. $value->title.'"';
	}
}
echo ' href="'. $value->link.'"';
Commenting out the echo title, or hard-coding some value will also affect the displayed value - something like:

Code: Select all

echo '<a class="'.$value->button->methodname.'"';
if ($value->type == 2) {
	if ($value->overlib == 0) {
		// COMMENT OUT
                //echo ' title="'. $value->title.'"';
                // OR MODIFY
                //echo ' title="The title I want to display."'; 
	}
}
echo ' href="'. $value->link.'"';
Hope this helps.