Skip to Content Skip to Menu

URLs and SEO/meta for individual Activity items

  • Pomond
  • Pomond
  • OFFLINE
  • Posts: 64
  • Thanks: 17
  • Karma: 5
7 months 3 days ago #337853 by Pomond
Hi:
We're looking at how individual public-facing Activity items might be indexed by search engines (or not), such as when using the Share feature and its generated URL for an item, or even just search engine indexing of a page listing an Activity stream.

I'm guessing this isn't supported (or easily doable), but I wanted to ask: Is it possible to integrate meta elements for individual Activity items (or opengraph support, etc.), or optimize the URL?

I have a rule to not chase our tails seeking specific SEO/SEM results, but a customer is asking ... thanks!

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 months 3 days ago #337858 by krileon
Yes that's possible. You can insert metadata using CB Auto Actions on any trigger infact. For activity this would be on the activity_onDisplayActivity trigger, which has the following variables.
Code:
[ &$rowStream, &$row, [ 'title' => &$title, 'caret' => &$caret, 'date' => &$date, 'message' => &$message, 'content' => &$content, 'media' => &$media, 'header' => &$header, 'footer' => &$footer, 'menu' => &$menu, 'compact' => &$compact, 'obscured' => &$obscured, 'isDetails' => false, 'isNew' => $isNew, 'isRow' => $isRow, 'isModal' => $isModal, 'isInline' => $isInline, 'isSimple' => $isSimple, 'isEmbed' => $isEmbed, ] ]

var1 is the stream object. var2 is the activity object. var3 is an array of all the layout data.

Now you'll need to be a bit careful here since this trigger is applied anytime an activity entry is rendered. So you'll need to condition against some of the layout data. Specifically "isRow" as that indicates a single row is being rendered. You would do this with the following condition.

Field: Custom > Value
Custom Value: [var3_isRow]
Operator: Equal To
Value: 1

Now you can output whatever metadata you like having access to the stream, the activity, and all its layout data. Additionally whatever Joomla menu item metadata you've configured should also be applying automatically.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: webiedesign

Please Log in or Create an account to join the conversation.

  • Pomond
  • Pomond
  • OFFLINE
  • Posts: 64
  • Thanks: 17
  • Karma: 5
7 months 3 days ago #337861 by Pomond
Awesome. Thank you. I am not as deep into the dev side of things, so these processes usually take some time and testing for me to wrap my head around, but it's immensely useful to know the capability exists, and to see a process and examples for it. Thanks again!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum