Additional fields available to display in Contact Articles#14671
Additional fields available to display in Contact Articles#14671AndySDH wants to merge 2 commits intojoomla:stagingfrom AndySDH:staging
Conversation
|
I have tested this item ✅ successfully on 5e96eaf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14671. |
Bakual
left a comment
There was a problem hiding this comment.
It doesn't hurt to select more fields from a that table if they may be used in overrides.
|
@Bakual Thanks, I agree :) Here's just an example of what can be accomplished with those additional fields available: https://www.thesmackdownhotel.com/channel/wwe-2k |
|
@AndySDH where to find Settings for introtext, images and publish_up after applying PR? |
|
@franz-wohlkoenig There are no settings, as the Contact Articles options are really really limited right now. We only have "Show User Articles (Show/Hide) and "# Articles to List" (Contact Articles options would definitely need some love overall, but I understand it's far from being a priority) So right now the only way to customize the output of Contact Articles is not via options but by overriding the template file of com_contact/contact/default_articles.php All this PR does is making more fields (introtext, images and publish_up) available to be used in said overrides. |
|
@AndySDH got it, thanks for Info. I thought its about Core-Options (which i would like). |
|
@franz-wohlkoenig Ideally, it would be fantastic if Contact Articles could use the same options as Category Articles (with options for both Blog Layout / List Layout), including pagination. Currently it's a display of it's own and it's very limited. But I assume that would be a big project. |
|
Title, Introtext, Image, Createddate + Pagination > huge Step. |
|
Yeah, so maybe you guys can consider it for the future. Perhaps to use the same "shared" Article settings as Categories. |
|
Hello, what is the status of this small fix being added? Newer and newer Joomla updates keep coming out yet this keeps seeming to be left out, so I'm finding myself to always having to core-override it on each update. |
I noticed that this was low-key fixed in 3.8.2, not sure if there was another PR for it. I also noticed that ->select('a.publish_up') was added to the list of available fields, so we're almost there haha :) However ->select('a.introtext') and ->select('a.images') still weren't added. Any chance those get added too? |
|
I have tested this item ✅ successfully on 8d93a4a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14671. |
|
@henkrijneveld can you please retest? |
|
Hey guys, please note that now the components/com_contact/models/contact.php file is very different in 3.8.2 than what it was when this PR was first opened, so the whole content of the file in this PR would be conflicting with the current one. But the only difference is adding these lines to the current one in the same position as before: It works just fine, using it on my site (which is updated to 3.8.2) |
|
Status is set on "Needs Review". |
|
You could create an override for Modules: Articles - Category, include it in contacts and filter by the author too :) This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14671. |
|
Let's decide whether to include the following: |
|
Please rebase for j4.0. thx. |
The Joomla 4 re-do version of this: joomla#14671 This adds the ability to display images and introtext fields for articles in contact pages. Despite not being used in the default core view, this is useful to make the introtext and images fields available at your disposal to use in overrides.
|
Created this: #24897 |
Right now, the Contact Articles (articles written by an author) View (com_contact/contact/default_articles.php), has very limited possibilities on what fields it can show. While we can leave the default layout as it is, we should at least allow web designers that want to improve that view in a template override to be able to call for more fields, so we should make them available in the com_contact/models/contact.php. Specifically, I added introtext, images, and publish_up. Also it might be worth noting that right now default_articles.php uses a.created instead of a.publish_up to order articles, maybe using the latter would be more appropriate.
Summary of Changes
(changed in bold)
$query = $db->getQuery(true)
->select('a.id')
->select('a.title')
->select('a.introtext')
->select('a.images')
->select('a.publish_up')
->select('a.state')
->select('a.access')
->select('a.catid')
->select('a.created')
->select('a.language');