Jump to content

Theme Help: Customising Activity Stream Widget


Recommended Posts

Hey all, trying to customise the activity stream a little bit and coming into some roadblocks. The templates for these aren't as accessible as some of the others in the IP suite 😅

I'm digging into the core > front > widgets > streamItem template right now, and redesigning as I see fit... I'd like to be able to include a record image (or in some cases, a custom field) in the stream snippet if the type of content is something specific (i.e. a record image for a record posted in a 'news' database, and a custom field [image] for a record posted in a different database). How would I go about calling the fields for these?

I tried something like this, to test:

              	{{if $itemData['record_image']}}
              		<p>Yes</p>
              	{{else}}
		            <p>No</p>
              	{{endif}}

But it doesn't seem to work (just outputs 'No' regardless, so I'm assuming it's not successfully calling the record image field for the stream item).

Any ideas?

Link to comment
Share on other sites

OK so small update, that 'record_image' code actually did work and it was just not showing up for me because of a cache issue. 😄 But I'd like to explore things further with this.

1. I'd still like to try and call custom fields within a streamitem

2. I'm trying to create an IF statement that would allow me to display something only if the streamItem entry is a certain content type (i.e. if this is a status update, then display this; if this is a 'news' database record, display that).

I know the key to this is within the "$indexData['index_title']" but I can't seem to work out the correct parameters to accomplish the above tasks. Anyone have any ideas?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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