Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

Search Box Placeholder For Different Categories

  • MyWorld
  • MyWorld's Avatar Topic Author
  • Senior Member
  • Senior Member
More
IP: 70.27.106.234 5 years 2 months ago #5534 by MyWorld
Hi there,

I have two different categories.

I am using the search box on category 1 at the moment and it has a placeholder text, eg: "Search For XYZ".

When I enable the search for the Category 2, it's showing the placeholder text as per above.  Is there a way the Category 2 can have its own placeholder text?

Thanks!
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 24.185.124.166 5 years 2 months ago #5535 by syw
Hello!

There is a way to do it if you are using 2 different menu items (= views) for your categories.

It requires you override the search layout 'tcpsearch' twice (doc on overrides: simplifyyourweb.com/documentation/trombi...-information/layouts ).

In each menu item, set the parameter 'layout suffix' ('advanced' tab), for instance 'cat1' in the view showing contacts from category 1, 'cat2' in the view showing contacts from category 2.

Your overrides will then have the names:
tcpsearch.cat1.php and tcpsearch.cat2.php

In each override, change the language key COM_TROMBINOSCOPEEXTENDED_SEARCH_TEXT to
COM_TROMBINOSCOPEEXTENDED_SEARCH_CAT1_TEXT and COM_TROMBINOSCOPEEXTENDED_SEARCH_CAT2_TEXT or directly to the text you want to use (if your site in in one language only).

If you use the new keys, you will have to create language overrides for those keys for each language.

Quite a few steps, but that's it!

Olivier.