Wildcard Chris Posted April 11, 2018 Posted April 11, 2018 Hey guys, I have a record database setup that I'd like to be able to search by record ID (in the regular search box). My idea was to create a custom field that used the record ID $databaserecordID or something along those lines. Does anyone have any ideas, or know exact what the $class is for the ID itself? Thanks! EDIT: I figured out how to do it
Jimi Wikman Posted April 12, 2018 Posted April 12, 2018 Care to share Chris? Might help others who want to try something similar in the future? Also let us know what you are building when you are done so we can drop by and get inspired
Wildcard Chris Posted April 12, 2018 Author Posted April 12, 2018 15 hours ago, Jimi Wikman said: Care to share Chris? Might help others who want to try something similar in the future? Also let us know what you are building when you are done so we can drop by and get inspired I figured out how to get the record ID to show and placed it in the record template under the title: <div class='ipsType_break ipsContained'>{$record->_title}</div> {{if $record::$customDatabaseId == "24"}} <div style="color:#fff;font-size:14px;">Incident# {$record->primary_id_field}</div> {{endif}} Which shows like this: https://gyazo.com/0da3ed632ae336431d769dcba9559c72 But now I'm still trying to figure out how to make it searchable. As from what I know the search only searches within Content|raw and the title.
Meddysong Posted April 12, 2018 Posted April 12, 2018 1 hour ago, Wildcard Chris said: from what I know the search only searches within Content|raw and the title. Yep, that's correct. I know 4.3 expands search to other elements which weren't included before (products in Commerce, I think) but database fields other than title and content haven't been possible.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.