Redirect CMS Category to CMS Page [Prestashop]

<?php

class CmsController extends CmsControllerCore
{

public function initContent()
	{
		
CmsControllerCore::initContent();
		if(isset($this->context->controller->cms_category->id)) {
		 if($this->context->controller->cms_category->id == 17)
			Tools::redirect('index.php?id_cms=138&controller=cms');
			
		 if($this->context->controller->cms_category->id == 16)
			Tools::redirect('index.php?id_cms=137&controller=cms');
		}
	}

}