0

I'm trying to customize the "TNTSearch Search" string from the search.md page of the Plugin.

---
title: TNTSearch Search
---

Tried to put an override in my template folder and other stuff without success.

How can this be customized?

Mike
  • 5,416
  • 4
  • 40
  • 73

1 Answers1

0

Create file /user/pages/search/search.md and add your new title. E.g.:

---
title: My New Title
---

Update after chat: When default search_route: '/search' has been changed in config of plugin, above folder must match the name of the route.

Eg. if route is defined as search_route: '/mysearch' the overriding file should be /user/pages/mysearch/search.md

passerby
  • 1,807
  • 19
  • 26
  • Tried that too. No change to be seen. Also tried it with the folder name `tntsearch`. – Mike Feb 27 '21 at 18:07
  • Above will change the title of the tab in the browser. Or did you expect anything else? – passerby Feb 27 '21 at 18:12
  • Did not change the title in the browser either. – Mike Feb 27 '21 at 18:12
  • Above suggestion is tested and working fine in my fresh Grav 1.7.6 installation. Added fresh TNTSearch, no changes. Cache should not be an issue, but try `bin/grav cache` anyway. – passerby Feb 27 '21 at 18:13
  • Yeah, checked that too. CMS and Plugins are all newest versions. – Mike Feb 27 '21 at 18:15
  • When adding Markdown to `search/search.md`, does that show up above the search box? – passerby Feb 27 '21 at 18:21
  • No. Not title and breadcrumb show no change and adding contend not showing up. If i mess around with the override and do something stupid i get an parsing error from Grav, so the file is seen. – Mike Feb 27 '21 at 18:26
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/229299/discussion-between-passerby-and-mike). – passerby Feb 27 '21 at 18:30
  • OK i got it. I changed the Search Page Route in the plugin configuration. So the override had to be in a folder not called by the plugin name "search" but by the changed route name. – Mike Feb 27 '21 at 18:30