New answers tagged

1

You could create a plugin which was triggered by an event such as onContentPrepare, like this: <?php defined( '_JEXEC' ) or die; class plgContentHits extends JPlugin { public function onContentPrepare($context, &$article, &$params, $page = 0) { $parts = explode(".", $context); if (isset($parts[0]) && $parts[0] ==...


1

I suspect it's because you are running the code under a Joomla user who doesn't have permission to set values for that 'excluded' custom field. Within the Joomla field model code for setFieldValue() there's a call to FieldsHelper::canEditFieldValue($field) and if the Edit Custom Field Value permission for your user's group is not set to Allowed then the ...


1

It is basically a LEFT JOIN to relate the tables and WS_CONCAT() calls to prepare the output strings within the SQL (no extra php handling of the result set). If EVERY article has a date value in the fields_values table, then you can use innerJoin(); if you use innerJoin() and there is no related row in the joined table for a specific article, then that ...


2

Since Joomla 3.9.x you can search the content of articles in the back-end of the website by prefixing your search term with "CONTENT:" in the search field. If this does not help, you could temporarily disable search engine friendly urls in Global Configuration so that the links in the search results show you which component is generating the content.


2

First of all, you won't find the page in your menus: the ID in front of /14-get-involved/ indicates that there's no menu item for that page. Otherwise Joomla's SEF functionality would have changed it to /get-involved/ Do you have a category called get-involved? Does it contain any articles? Are you using none-core extensions like a Page Builder component? ...


3

I would have preferred to just suggest some touch ups to your snippet, but there is too much for me to address in your answer as a comment and I'd rather explain fully. Instead, I'll post this new answer which will review and clean up your assumed-working coding attempt for the benefit of you and future researchers. You are declaring $images = json_decode($...


1

The solution to my question. I think is valid: <?php $images = json_decode($item->images); ?> <span itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> <link itemprop="url" href="<?php // Create new DOMDocument object. $dom = new DOMDOcument; // Load article text into DOMDocument. $dom->loadHTML($item->...


Top 50 recent answers are included