Jump to content

[solved] Home Text Editor - how to display it only on homepage


Recommended Posts

Hi

 

I would like to display text on Home Page using Home Text Editor module but it does not play it anywhere.

 

Can someone point out what mistake im making or need to do?

 

My site add is www.softhands.dotco.uk

 

Right now the text you see, is using the another module but it displays text on everypage which i dont want.

 

Thanks

  • Like 2
Link to comment
Share on other sites

go to the modules -> positions, search for your module on list (it is attached to the TOP section),

click on edit icon. Then you can specify some exceptions - add all pages where you don't want to show it

Link to comment
Share on other sites

go to the modules -> positions, search for your module on list (it is attached to the TOP section),

click on edit icon. Then you can specify some exceptions - add all pages where you don't want to show it

 

Or edit "tpl" of the module and add

 

{if $page_name=='index') code_module {/if}

 

Sorry for my English.

  • Like 1
Link to comment
Share on other sites

all done... worked great.

 

Which of the two solutions, has applied to the end?

 

Sorry for my English

 

By the way, add the word "solved" to the title of the topic.

 

Sorry for my English.

 

The solution that the user "Vekia" commented is the more correct.

Link to comment
Share on other sites

  • 7 months later...

We are using PS 1.5.5. and we want the same thing, display the Home Text Editor (editorial) above the slider but when I try to transplant this module to displayTop I get an error "This module cannot be transplanted to this hook." Is this not possible anymore in 1.5.5?

Link to comment
Share on other sites

hello

 

you have to add in module .php file this function:

	public function hookDisplayTop($params)
	{
		if (!$this->isCached('editorial.tpl', $this->getCacheId()))
		{
			$id_shop = (int)$this->context->shop->id;
			$editorial = EditorialClass::getByIdShop($id_shop);
			if (!$editorial)
				return;			
			$editorial = new EditorialClass((int)$editorial->id, $this->context->language->id);
			if (!$editorial)
				return;
			$this->smarty->assign(array(
					'editorial' => $editorial,
					'default_lang' => (int)$this->context->language->id,
					'image_width' => Configuration::get('EDITORIAL_IMAGE_WIDTH'),
					'image_height' => Configuration::get('EDITORIAL_IMAGE_HEIGHT'),
					'id_lang' => $this->context->language->id,
					'homepage_logo' => !Configuration::get('EDITORIAL_IMAGE_DISABLE') && file_exists('modules/editorial/homepage_logo_'.(int)$id_shop.'.jpg'),
					'image_path' => $this->_path.'homepage_logo_'.(int)$id_shop.'.jpg'
				));
		}
		return $this->display(__FILE__, 'editorial.tpl', $this->getCacheId());
	}
Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...