This references a post on the Forum: Intro image not showing J 3.5
Access the two menu items (the "Blog" and the "Single Article") while not logged in.
The Intro Image should be displayed, in both views.
The Intro Image is displayed only in the "Category Blog" view, while in the "Single article" view no image is displayed.
Joomla 3.5.1, Protostar
Of course, once logged in, the Intro Image displays on the Blog page while the Full Article Image displays on the Single Article page.
Since, the Intro Text displays (when not logged in) it would make sense that the Intro Image also displays.
actually my code is a sloppy and quick copy-replace-paste job form the "full text" image part in which I now see there are very wrong parameters (e.g. $params->get('float_fulltext')
) and I told Robert it was untested!!!
How to say in these cases... maybe "I disown him as my son!"
Just in case, a better solution could be to simply use:
<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>
UNTESTED!!
(N.B.: injecting $this->item
into the Jlayout is IMHO wrong, but this is the way it is now done in the blog's blog_item.php
sub-template)
Apologies @smz.
Since I use CSS and not the float choice built into the admin options, I didn't notice.
Your second solution works too. Although if one wanted the float and the caption then the original would be preferable.
... hmmm float should work with the JLayouts too (by setting the option in "Images and Links")
... and caption too
You're correct. Float works. And so does the caption. Thanks for the fix.
You're welcome!
Should I turn this into a pull request?
If you're asking me, of course you can!
one could argue that comment in code (line 134) says:
<?php // Optional teaser intro text for guests ?>
I agree with @smz.
<?php // Optional teaser intro text for guests ?>
would then be
<?php // Optional teaser intro text and/or image for guests ?>
I cannot be the only person who has encountered this.
Well, not precisely:
what I mean is that the option description says
Image for intro text layouts such as blogs and featured
Image for intro text layouts such as blogs and featured
Intro text layouts are designed to display only the into text part of an Article. A non logged in user is not seeing an intro text layout ... the non logged in user is seeing an Article layout.. And an Article layout is a full text layout because ... the amount of the Article layout that a non logged in user sees is dependant on Permissions not on the Article layout.
Blogs/ featured pages and the Article Category Module are 'intro text layouts' because they are designed to display intro text not the full text of the Article.
There could be a case for displaying the Full Article image but not for displaying the intro text.
Addendum
what is displayed to guest is the intro text
But it is not being displayed in an 'intro text layout'. The default.php that is displaying it is a full text layout. The intro text image relates to the layout that is displaying it not the amount of that layout that is being displayed.
Kevin, if there is a consensus that things must be left as they are as otherwise some (not many I estimate) sites could have a surprise, so be it: not big deal, especially for me: I never use "Images and links". The beauty of being able to roll your own overrides is that anybody can tailor this details to his/her needs.
That said, my feeling is that a new user (think of a "blogger"), just exposed to Joomla, with no knowledge of what menu items, views, templates, layouts and JLayouts are, not to talk about the MVC architecture, would expect that "intro image" is displayed when, for whatever reasons, the "intro text" is displayed, and the "full text image" is displayed when "full text" is displayed.
Intro text layouts are designed to display only the into text part of an Article.
Why then are Intro Images displayed as part of Intro Text in the Blog Layout?
What you are saying defies logic.
Why then are Intro Images displayed as part of Intro Text in the Blog Layout?
Because the default.php for a Blog Layout is designed to display intro text (of an Article) ONLY. So by definition it is a "Intro text layout".
if there is a consensus that things must be left as they
Things do change but it's up to the devs as to what changes and why. All I am doing is giving my interpretation of the meaning of the tool tip. For some reason they (the powers that be) have chosen the term 'Image for intro text layouts' not 'image to display with intro text'.
imho there is a vast difference between 'Image for intro text layouts' and 'image to display with intro text'. Why that specific wording was chosen I don't know for sure but my opinion is because it fits in with the logic of the different types of layout.
I do see your point but (to me) it seems illogical to display the intro text in a full text (Article) layout just because that layout is restricting what is being displayed.
It would be interesting to hear from @brianteeman as to why that particular wording was chosen for the tool tip. And to hear from @mbabker the programming implications of such a change
Because the default.php for a Blog Layout is designed to display intro text ONLY. So by definition it is a "Intro text layout".
What you are saying is not what happens. In Blog layout -- whether the Article is "Public" or "Registered" -- the Intro Image displays before the Intro Text. So, it is not Intro Text ONLY. It is Intro Image and Intro Text together (if an Intro Image has been selected).
AS i've been tagged i've read the entire thread and to be perfectly honest I am completely confused because as soon as i undertsand the comment one of you makes you then contradict yourselves.
The Intro Image is displayed only in the "Category Blog" view, while in the "Single article" view no image is displayed.
That is exactly what I would expect to happen and it exactly what the tooltips say will happen
In Blog layout -- whether the Article is "Public" or "Registered" -- the Intro Image displays before the Intro Text. So, it is not Intro Text ONLY. It is Intro Image and Intro Text together (if an Intro Image has been selected).
You are taking the word 'only out' of context.
Blog (page) is an 'intro text layout' ... because the core blog default.php is only capable of displaying the intro text of an Article
Article (page) is not an 'intro text layout' ...because the core article default.php is capable of displaying all the text. Even if an Article (page) just displays the intro text it is still not an 'intro text layout'
The Intro Image is displayed only in the "Category Blog" view, while in the "Single article" view no image is displayed.
That is exactly what I would expect to happen and it exactly what the tooltips say will happen
Article is not an 'intro text' layout. If an Article Displays
Thank you for taking the time to read and comment
Blog (page) is an 'intro text layout' ... because the core blog default.php is only capable of displaying the intro text of an Article
Why then does the Intro Image display in Blog Layout?
Even if an Article (page) just displays the intro text it is still not an 'intro text layout'
It may not be an 'intro text layout' but it is Intro Text being displayed when the Article is set to display for Registered Users.
Sorry @rgmears but you are really flogging a dead horse
When you are in a blog or featured view then the intro text and any intro image will be displayed
When you are in a single article view then the intro text will display (unless set to not be displayed in the options) and any full image will be displayed.
This is working exactly as the documentation and the tooltips describe
...you then contradict yourselves.
I believe my statements to be consistent.
That this doesn't happen (without @smz's fix) baffles me.
To make sure there is no misunderstanding
I have made a video of creating an article with an intro image and full
image and set it to be registered
It is a completely clean install of 3.5.1 with nothing installed
I used the feature layout for speed but it is exactly the same with a blog
category
you are really flogging a dead horse
Try what is suggested at the top of this post. Add a Menu Item to your article, set it to public, and click on it.
You will see the "Intro Text" followed by a "Register to read more" button.
Regardless what the (tiny, hard to read) Tooltip says, what happens in the above scenario is not what this User expected.
Why then does the Intro Image display in Blog Layout?
Because the Blog (page) is displayed by the blog default.php which is an 'intro text layout'. And the intro image displays on pages that are an 'intro text layout'.
Even if an Article (page) just displays the intro text it is still not an 'intro text layout'
It may not be an 'intro text layout' but it is Intro Text being displayed when the Article is set to display for Registered Users.
I can see your confusion. Because the terms 'intro image' and 'intro text' both contain the word 'intro' you you see them as two entities that are mutually inclusive. They are two separate entities that are controlled separately
The word 'intro' in 'intro image'; refers to the .type of layout it is displayed in. (Conditional)
The word 'intro' in 'intro text'; refers to the amount of text that is being displayed.(variable)
OK I see what you mean - single articles is not something I usually do -
should be easy to do a PR to fix that which I will do in the morning.
Not sure if it will be backwards compatible but someone else can make a
call on that
On 12 April 2016 at 00:28, Kevin Griffiths notifications@github.com wrote:
@rgmears https://github.com/rgmears
Why then does the Intro Image display in Blog Layout?
Because the Blog (page) is displayed by the blog default.php which is an
'intro text layout'. And the intro image displays on pages that are an
'intro text layout'.Even if an Article (page) just displays the intro text it is still not an
'intro text layout'It may not be an 'intro text layout' but it is Intro Text being displayed
when the Article is set to display for Registered Users.I can see your confusion. Because the terms 'intro image' and 'intro text'
both contain the word 'intro' you you see them as two entities that are
mutually inclusive. They are two separate entities that are controlled
separatelyThe word 'intro' in 'intro image'; refers to the .type of layout it is
displayed in. (Conditional)
The word 'intro' in 'intro text'; refers to the amount of text that is
being displayed.(variable)—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9830 (comment)
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Thanks @brianteeman
If you would provide a bit of guidance, I could do the Pull Request for this.
Its ok - will submit in 5 minutes - better code than suggested before as it
uses the layout correctly and the plugins (i hope)
On 12 April 2016 at 00:42, Robert G Mears notifications@github.com wrote:
Thanks @brianteeman https://github.com/brianteeman
If you would provide a bit of guidance, I could do the Pull Request for
this.
This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/9830
https://issues.joomla.org/tracker/joomla-cms/9830.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9830 (comment)
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-11 23:52:47 |
Closed_By | ⇒ | brianteeman |
Closed - please test #9865
(Note - talking about the blog category in the original post was confusing)
This fix from @smz works.
Change is:
added before line 136
<?php echo $this->item->introtext; ?>
File is templates/protostar/html/com_content/article/default.php
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9830.