User tests: Successful: Unsuccessful:
fixes #7547
Install Joomla 3.x
Create any article, and create menu item for category blog
in menu (or com_content) configuration, turn off "show intro text"
view menu item from front end and notice introtext still showing
introtext shouldn't show when the configuration is set to not show it.
found the solution in components/com_content/views/category/tmpl/blog_item.php Line 44-46
the code to display introtext is not inside a conditional statement, it will always show, no matter what.
Solution coming in just a minute
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
interesting - that's my misunderstanding of how that "show introtext" works - especially since it's configured for the Category Blog view, and not the article view.
So currently there is no way to turn off the introtext at the category blog view?
Can I ask what it is you are trying to achieve. I'm a little confused
In a blog view, in menu configuration we have the option to turn on/off introtext - which JM pointed out is technically not actually for the blog view, it's for the article view only.
But in the blog_item.php file, there is already some logic for what to do if it is set to not show introtext. We see that on Line 44 of blog_item.php
<?php if (!$params->get('show_intro')) : ?>
- <?php echo $this->item->event->afterDisplayTitle; ?>
-<?php endif; ?>
-<?php echo $this->item->event->beforeDisplayContent; ?> <?php echo $this->item->introtext; ?>
it doesn't make sense that we would have that if statement there, if there was no intention at all to allow the configuration to show/hide introtext. It looks to me like we properly put the "if" there to handle what happens if it is set to not show introtext - but we left the actual display of introtext out of the logic, leaving out an "else" (or another "if") - so, regardless of what show_intro is set as, introtext will always show.
Again, if we're always going to show introtext, there's no need to have that if statement to begin with.
What I'm trying to do immediately is have a blog view that shows some extra fields I made (via a plugin and template override) - but leave everything else (including introtext) to follow the configuration (meaning, if I set introtext to not show in the menu, it shouldn't show, if I set it to show, it should show). But I came across this when no configuration combination would ever not show the introtext in the blog view, which, again, doesn't make much sense if we 1) have a configuration option for it, and 2) already have this (incomplete) code logic to do it as well.
The logic if I understand it correctly is that if you set introtext to show then it is shown in the full article and the blog/featured view. If you set it not to show then it is shown in the blog/featured view only and now in the full article. The use case for this that I use when teaching is for a movie review web site where the introtext is used for a summary of the review which you wouldnt want repeated in the full article.
In your specific use case I would either create a custom template override or begin the article with the readmore. (Not sure how/where you are displaying the extra fields)
I'm already using a template override to add in the custom fields - so it doesn't much matter for my immediate use case.
Is there a reason we'd need that current "if" logic there if we have no intention of ever not showing the introtext in blog/featured views? Why do we need any conditional logic there at all?
If that's the way it should be, that's perfectly fine. The only reason I submitted anything is because we had what appeared to be a partial logic there.
No use to make this PR Travis compliant imho as it does not solve the issue we have of its use for the drilldown ONLY.
In fact, it does work as should (show the intro in blog and not when article only is displayed) if param set at the article level, not at the blog or featured level.
Hmm
Rel_Number | 0 | ⇒ | 7547 |
Relation Type | ⇒ | Pull Request for |
So, we do have a bug indeed although it is not, normally, the one described by jneubauer.
If the original bug can't be solved (drilldown), why not use this patch with a new tip and Options for the Show Intro, permitting indeed to not show anything else than the title of the article in the blog/featured view?
That could be of use for some (although it is easy to insert a pagebreak before any content to achieve the same result) instead of a non-functionning parameter.
What do you think?
I think it has more use cases than you think. In any sites where it is more than the site administrator, or highly trained editors creating content, requiring users creating content to start an article with a readmore is an obtuse workflow at best, and very confusing.
I think it's worth it to add this option to these layouts.
Labels |
Added:
?
|
Easy | No | ⇒ | Yes |
Category | ⇒ | Front End |
@infograf768 thoughts on this? I've updated it as you requested, am I missing something? is there something else I'm supposed to do?
We still have issues in the sense that the "Show Intro Text" field does display when editing the menu item (blog and featured) although it does nothing + the fact that "Show Blog Intro Text" params include "Use article Settings" as a possible setting.
Is this still an issue? I'm willing to test the issue/pull request if warranted.
I have tested this item successfully on d3aea02
it works for my
I have tested this item unsuccessfully on d3aea02
Error could not fixed. Intro still shown.. see screenshots
I have tested this item unsuccessfully on d3aea02
Introtext is show, issue exist
Status | Pending | ⇒ | Information Required |
Labels |
@jneubauer can you have a look here? Also the codestyle needs to be fixed let me know if you need more information about it
I have tested this issue.
Steps as described done
Make catory blog and menu for the blog
Make article with a read more in it.
Then I set in the articles options the option to Show Intro Text on Hide
Tested the article at the frontend and it works fine as expected.
Then I set the option in articles to show introtext on Show and go the options of the menu and set the option for show introtext on Hide
Save it an go to the frontend and test is.
It works also as expected When I click show more the introtext disappears and the text after read more shows up
I also tested this issue.
Steps as described done
Make catory blog and menu for the blog
Make article with a read more in it.
Then I set in the articles options the option to Show Intro Text on Hide
Tested the article at the frontend and it works fine as expected.
Then I set the option in articles to show introtext on Show and go the options of the menu and set the option for show introtext on Hide
Save it an go to the frontend and test is.
It works also as expected When I click show more the introtext disappears and the text after read more shows up
Hello @jneubauer
We have now 4 unsuccessful tests, can you verify the issue still exists or not.
If no reply is received within 4 weeks we will close this issue.
Thanks for understanding!
Regardless of this pull request.
The minimum that should be done, is improve the parameter label and description
Label is cryptic, and the description is difficult to understand the least.
Majority of people should be able to understand it without getting a lesson about it.
JGLOBAL_SHOW_INTRO_LABEL="Repeat summary text (intro-text) in article views"
JGLOBAL_SHOW_INTRO_DESC="Intro text is the article summary text, that is placed before 'Read more' marker in the article's description. Usually summary text is only shown in category / multi-article views, and the part after 'Read more' is shown in article views
- Enabled this parameter to also show the summary text in the article views"
I don't say that above is best, but it is better than what we have currently
Irrespective of the quality of the current text it is not correct to call
it a "summary text" - that has a very specific meaning that is not the same
as "introduction"
On 12 December 2015 at 19:33, Georgios Papadakis notifications@github.com
wrote:
Regardless of this pull request.
The minimum that should be done, is improve the parameter label and
descriptionLabel is cryptic, and the description is difficult to understand the least.
Majority of people should be able to understand it without getting a
lesson about it.JGLOBAL_SHOW_INTRO_LABEL="Repeat summary text (intro-text) in article
views"
JGLOBAL_SHOW_INTRO_DESC="Intro text is the article summary text, that is
placed before 'Read more' marker in the article's description. Usually
summary text is only shown in category / multi-article views, and the part
after 'Read more' is shown in article views
- Enabled this parameter to also show the summary text in the article views"
I don't say that above is best, but it is better than what we have
currently—
Reply to this email directly or view it on GitHub
#7549 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
@brianteeman,
you are right, so let's better call it with a full word inside the description, thus it should be:
"introductory text"
JGLOBAL_SHOW_INTRO_LABEL="Repeat intro text in article views"
JGLOBAL_SHOW_INTRO_DESC=""Intro text is the introductory text, that is placed before 'Read more' marker in the article's description. Usually intro text is only shown in category / multi-article views, and the part after 'Read more' is shown in article views <br/><br/> - Enabled this parameter to also show the intro text in the article views"
Why dont we write what it really is which is exactly what it says right now
JGLOBAL_SHOW_INTRO_DESC="If set to Show, the Intro Text of the article will
show when you drill down to the article. If set to Hide, only the part of
the article after the "Read More" break will show."
JGLOBAL_SHOW_INTRO_LABEL="Show Intro Text"
On 12 December 2015 at 20:08, Georgios Papadakis notifications@github.com
wrote:
@brianteeman https://github.com/brianteeman,
you are right, so let's better call it with a full word inside the
description, thus it should be:
"introductory text"JGLOBAL_SHOW_INTRO_LABEL="Repeat intro text in article views"
JGLOBAL_SHOW_INTRO_DESC=""Intro text is the introductory text, that is
placed before 'Read more' marker in the article's description. Usually
intro text is only shown in category / multi-article views, and the part
after 'Read more' is shown in article views
- Enabled this
parameter to also show the intro text in the article views"—
Reply to this email directly or view it on GitHub
#7549 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Even if the parameter description text does not change,
(which it should because it is incomplete, most users will need to do homework to understand what it does) , still the parameter - label - should be changed because it is misleading
Nobody reading it for first or second time can imagine what the parameter is really about
I admit i was confused first time(s) that i read encountered it (the label),
Most users do not understand? Really?
On 12 Dec 2015 8:37 pm, "Georgios Papadakis" notifications@github.com
wrote:
Even if the parameter description text does not change,
(which it should because it is incomplete, most users will need to do
homework to understand what it does) , still the parameter - label - should
be changed because it is misleadingNobody reading it for first or second time can imagine what the parameter
is really about
I admit i was confused first time(s) that i read encountered it (the
label),
- that is because the parameter is for a different view (article views) and not for current view (category)
—
Reply to this email directly or view it on GitHub
#7549 (comment).
After having to answer several forum threads, i have replaced Joomla's default text (in our component) with:
*_SHOW_INTROTXT="Show introductory text"
*_SHOW_INTROTXT_DESC="Introductory Text is used to present the content in category and other multi-item listings, you can choose here whether to show it when the content is displayed in full view, thus prepending it before content's full text"
the label i did not change because it is used in various xml files and not just in category, which Joomla does too.
it is best to have 2 label/description for this, 1 for category.xml, etc xmls, and 1 for article.xml, since using the same label and description in both category.xml and article.xml adds to the confusing
Currently the label is good for article.xml, and the description is good for category.xml
Anyway, if it confuses programmers, it is expected to confuse normal users,
i don't say current description is bad, but without careful reading of the description the label really confuses
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-29 09:40:40 |
Closed_By | ⇒ | brianteeman | |
Labels |
Labels |
I am closing this PR at this time. The original poster is unlikely to update it and it has multiple failed tests. If anyone wants to propose changes to the language strings or any other method to address this then please create a new pull request
I think you are mistaking:
the tip is:
So, normally, and this indeed does not work, when displaying the article by using the readmore (or clicking on its title link=> to check) from a blog or featured layout, it is there that the intro should show or not.
This PR does not do that here.