CMS MADE SIMPLE FORGE

News Module

 

[#3751] Replace title tag with News title like Calendar Module does

avatar
Created By: Sofia Hauschildt (sonya)
Date Submitted: 2009-07-18 15:31

Assigned To:
Resolution: Won't Fix
State: Closed
Summary:
Replace title tag with News title like Calendar Module does
Detailed Description:
Replace title tag automatically with news title in the detailed view.

Calendar module does it for events details with the code below:

	// Adds the event title to the page title
	function ContentPostRender(&$content)
	{
		global $gCms;
		$module =& $gCms->modules['Calendar']['object'];
		if (isset($module->current_event_title))
		{
			$text = $module->current_event_title;
			if (function_exists('str_ireplace'))
			{
				$content = str_ireplace('<title>', '<title>'.$text. ' - ', $content);
			}
			else
			{
				$content = eregi_replace('<title>', '<title>'.$text. ' - ', $content);
			}
		}
	}

History

Comments
avatar
Date: 2010-04-11 11:22
Posted By: Robert Campbell (calguy1000)

This can be done quite asily with smrty tags.
      
Updates

Updated: 2012-04-15 00:13
state: Open => Closed

Updated: 2010-04-11 11:22
resolution_id: => 8