How can I get rid of the title “Author” in the facet block? The reason I want to get rid of it is because I want to create a custom title in the block header such as “Search by User” from the block admin page. Hence, it would be redundant to have something like “Search by User” and then directly below that “Author.” Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| Get rid of author.jpg | 13.29 KB | rockwright |
Comments
Comment #1
cpliakas commentedHi rockwright.
This is understandable, and the easiest way to do so is to implement hook_luceneapi_facet_alter(). It will be something similar to the following:
After adding this code, you should clear your cache for the changes to start taking effect.
Comment #2
rockwright commentedWhich file should I put the code in? Thank you.
Comment #3
cpliakas commentedHi rockwright.
This would have to go in a custom module. You don't want to put it in luceneapi's codebase, because that will break upgrade paths. There are some great tutorials at http://drupal.org/node/231276 on how to create custom modules. If you just want to add this functionality, you will have to create a directory in sites/all/modules, add a .info file inside that directory, and add a .module file inside that directory containing the code in #1 above. For example, if you wanted to stick with the "mymodule" name, you would create the directory "mymodule" and add the "mymodule.info" and "mymodule.module" files inside of that. Note that if you can name the module whatever you want, but the function will have to be modified to reflect what you choose as well.
Thanks,
Chris
Comment #4
cpliakas commentedMarking as fixed after weeks of inactivity.