joomla-cms
joomla-cms copied to clipboard
[5.x] Contact articles new layout with image
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.
Expected result AFTER applying this Pull Request
Apply the PR, run "npm run build:css"
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
isnt this something btter left as a template override.
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.
This pull request has been automatically rebased to 5.1-dev.
Works for me. But why did you use the showon="show_articles:1" only in com.config and not for menu Items?
@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 I have no idea how this happened ...
@ceford can you please check if the warning dissapeared?
@chmst it seems showon doesn't work with fields using global options
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.
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.
RTC
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41132.
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.
Or then you will have the layout options that people might want as this looks like a blog layout but without the controls
Or some of the more basic options that we had to add to the Article Newsflash Module
In summary there is nothing in this PR that can not be achieved currently with a template override
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.
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.
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.