Jump to content

renaming block title


Recommended Posts

Hello,

I wanted to customise the look of my manufacturers block so I added the following file structure to my theme template

themes/enchanted/modules/blockmanufacturer/blockmanufacturer.tpl

I was able to alter the title to "Shop by Brand" and it works well

I also want to alter the categories block title to "Shop by Category" (or whatever) however doing it by overriding the category module .tpl makes the categories in the block disapear.

Is there an easier way of doing this ?

Ta

Dave

Link to comment
Share on other sites

  • 1 month later...

I have the exact same problem. I need to change the title of the Categories block to "Countries" but I cannot figure out how to do that.

I also need to change the title of the Tags block to "Regions". Has anyone here have any experience on this?

Link to comment
Share on other sites

You can rename anything in prestashop using the translation tool

In the backoffice -> Tools -> Translations -> Front office (or Modules) and click on a flag, if you click on the flag of your default language, then you will be able to change any text.

Link to comment
Share on other sites

  • 10 months later...

Hey tomerg3

If you do see this I just wanted to say thanks for the info, and thanks for being a part of this project.... I have been using Zencart for over 5 years, and just switch over to PrestaShop -- I can't hardly believe how easy it is to modify....THANKS...and yes I'm making a donation..:)

Link to comment
Share on other sites

  • 3 years later...

Yes - but I think I figured it out. 

 

I was trying to modify the default blocktags.tpl file and not the one in themes/default-bootstrap/modules/blocktags/

 

I changed the word "Tags" to "Colors" in this file  - hopefully this was the correct way to do this?

 

<!-- Block tags module -->
<div id="tags_block_left" class="block tags_block">
<p class="title_block">
{l s='COLORS' mod='blocktags'}
 
Thanks for your prompt reply.
Link to comment
Share on other sites

I am trying to change the block name "TAGS" to "COLORS" - This doesn't work for that (or I couldn't find it in the translations menu)

 

Where can I change this?

BO/localization/translations

Choose "Installed Module Translations", your theme and your language

Click Modify then scroll down to find Blocktags

  • Like 1
Link to comment
Share on other sites

Yes, I was at the Front Office Translations. 

 

However - when I try Installed Modules Translations I get this error - and nothing shows up.

 

Warning! Your PHP configuration limits the maximum number of fields allowed in a form
1000 for max_input_vars.
Please ask your hosting provider to increase this limit to 2674 at least, or you will have to edit the translation files.

Link to comment
Share on other sites

The word "Popular" appears on the home page as part of the Top Sellers module. However, the word "Popular" does not appear on the translations page.

 

I am concluding that translation will not work for text that is embedded in modules. Instead, the text must be modified within the module code itself. Is that correct?

Link to comment
Share on other sites

The word "Popular" appears on the home page as part of the Top Sellers module. However, the word "Popular" does not appear on the translations page.

 

I am concluding that translation will not work for text that is embedded in modules. Instead, the text must be modified within the module code itself. Is that correct?

They are all there if you look deep :)

 

look in localization/translations then down to homefeatured

 

post-535854-0-36891200-1418240497_thumb.jpg

Link to comment
Share on other sites

Aha! The plot thickens...

 

Turns out I was looking at Front Office Translations and not Installed Module Translations.

 

HOWEVER, I ran into the Suhosin field limit so until my hosting provide modifies that, I still can't get to the translation.

 

Thanks for helping me locate it though!

Link to comment
Share on other sites

  • 1 year later...
  • 7 years later...
On 12/10/2014 at 6:56 PM, mickeyboy1 said:

BO/localization/translations

Choose "Installed Module Translations", your theme and your language

Click Modify then scroll down to find Blocktags

Yes is work , 

Link to comment
Share on other sites

 

 

I was also looking for solution just similar to your problem... I came through several solution but nothing works for me. Following are some of the solution that i tried and it did work for me.

1 - Create a new file named catalog_category_view.xml within your theme's layout folder:

Quote

themes/enchanted/layout/catalog_category_view.xml


2 - Add the following XML code to this file. This injects a new UI component (title) before the existing category title, allowing you to set your custom title: Details here: GWA Calculator
 

Quote

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="main">
            <uiComponent name="category.view">
                <block class="Magento\Framework\View\Element\Template" name="category_custom_title" after="page.main.title" template="Magento_Catalog::category/custom_title.phtml" />
            </uiComponent>
        </referenceContainer>
    </body>
</page>


3 - Create a new template file named custom_title.phtml within your theme's Magento_Catalog folder:
 

Quote

themes/enchanted/Magento_Catalog/category/custom_title.phtml

4 - Add the following code to this template file. This simply displays your desired title:

Quote

<div class="category-custom-title">
    <h1>Shop by Category</h1>
</div>

Edited by robertwolf (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...