joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.x] Contact articles new layout with image

Open drmenzelit opened this issue 2 years ago • 12 comments

New layout for articles in contact.

Summary of Changes

Added two new parameters in the contact component to display the intro image and the introtext of an article inside a contact.

Testing Instructions

Create an article. Create a contact connected with your user. Activate the Content - Contact Plugin with redirection to Internal contact page. Create a menu item for the article, display the author as link. Create a menu item for contacts. Configure the contact to display articles.

Actual result BEFORE applying this Pull Request

A simple list of linked articles titles.

2023-07-10 09_58_54-Contact – Mozilla Firefox

Expected result AFTER applying this Pull Request

Apply the PR, run "npm run build:css"

2023-07-10 09_59_17-Contacts_ Options - Joomla 5 - The future - Administration – Mozilla Firefox

2023-07-10 10_00_41-Contact – Mozilla Firefox

2023-07-10 14_43_55-Contacts_ Options - Joomla 5 - The future - Administration – Mozilla Firefox

2023-07-10 14_44_16-Contact – Mozilla Firefox

2023-07-10 15_38_19-Contact – Mozilla Firefox

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [X] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [X] No documentation changes for manual.joomla.org needed

drmenzelit avatar Jul 10 '23 13:07 drmenzelit

isnt this something btter left as a template override.

brianteeman avatar Jul 11 '23 18:07 brianteeman

There seems to be no way to override the Global Intro Image and Intro text settings for an individual Contact (other than via a menu item).

With User Articles, Intro Image and Intro Text all set to Yes I get this error, seems to be for articles without Intro images:

Warning
: Attempt to read property "image_intro" on null in
/Users/ceford/Sites/joomla-cms/components/com_contact/tmpl/contact/default_articles.php
on line
26

I think work is needed!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.

ceford avatar Sep 13 '23 10:09 ceford

This pull request has been automatically rebased to 5.1-dev.

HLeithner avatar Sep 30 '23 22:09 HLeithner

Works for me. But why did you use the showon="show_articles:1" only in com.config and not for menu Items?

chmst avatar Nov 18 '23 22:11 chmst

@drmenzelit It seems you've messed this PR which now has base branch 5.1-dev by upmerging branch 5.0-dev into it.

richard67 avatar Nov 20 '23 15:11 richard67

@richard67 I have no idea how this happened ...

drmenzelit avatar Nov 20 '23 15:11 drmenzelit

@ceford can you please check if the warning dissapeared?

@chmst it seems showon doesn't work with fields using global options

drmenzelit avatar Nov 22 '23 09:11 drmenzelit

I have tested this item :white_check_mark: successfully on 355fcdb3d816fc069f772a86f00e378af9443d24

Tricky to follow the instructions but I got there - a list of articles with or without Intro Image and/or Intro Text.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.

ceford avatar Nov 22 '23 16:11 ceford

I have tested this item :white_check_mark: successfully on 355fcdb3d816fc069f772a86f00e378af9443d24

Thanks @drmenzelit


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.

fgsw avatar Nov 23 '23 07:11 fgsw

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.

richard67 avatar Nov 23 '23 09:11 richard67

The more I look at this the more I don't believe this should be in core. This PR just creates a very specific display of an article intro image and text. Which is fine but we know that people will want more control than that.

You only have to look at the display options in the content modules to see that.

image

Or then you will have the layout options that people might want as this looks like a blog layout but without the controls

image

Or some of the more basic options that we had to add to the Article Newsflash Module

image

In summary there is nothing in this PR that can not be achieved currently with a template override

brianteeman avatar Dec 15 '23 22:12 brianteeman

I have tested this item :white_check_mark: successfully on 355fcdb3d816fc069f772a86f00e378af9443d24


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.

agimusweb avatar Feb 24 '24 10:02 agimusweb

Hey @drmenzelit ,

thank you for your idea, I see your potential use case.

After many discussions I had to take a decision and I tend to agree with the statement, that this behaviour can be done via an easy override. So I will close it for now.

bembelimen avatar Mar 02 '24 15:03 bembelimen

that this behaviour can be done via an easy override

… if you are a developer.

Not, if you are a user who can't change source codes. Overrides lacks a User Interface.

fgsw avatar Mar 02 '24 15:03 fgsw