Jump to content

Displaying Text in Condensed Activity View


evandixon

Recommended Posts

I have a \IPS\Content\Item class that implements \IPS\Content\Searchable. I've successfully gotten it to display arbitrary content in the search snippet in expanded view:

image.thumb.png.ab2e136d3e222a77d56efb5e00ee8c4d.png

I have not, however, succeeded in getting anything in condensed view. Other content items have a "user posted a ___ in ___", but mine shows nothing:

image.thumb.png.142160ad103398c145ab65db0cb1e8e9.png

When I look at the other applications shown in this picture, this isn't stored in the snippet template. As far as I can tell, something's displaying the language item "x_created_(class)" or "x_created_(class)_in" here, but I don't know how to tell the system to do so for my content item. Simply making sure those language items exist isn't enough, and based on other parts of the site, I'd expect to see the placeholder if it was. Does anyone know what I need to do for this specific behavior?

In case it's relevant, my content class does not have a container. Occasionally this results a quirk I can work around, and I don't know if this is another one.

Link to comment
Share on other sites

  • 3 weeks later...

Found the issue. \IPS\Content::searchResultSummaryLanguage is what adds that text, and the core system template "searchResult" only displays that if there's a container. So I need a container.

After doing the bare minimum to get containers implemented, rebuilding the search index because the lack of containers was cached, and after fixing some undefined language stuff, it works:

image.thumb.png.e1d6655bc7dab3ed7e8e9932b295c9dc.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...