No Code Attached Yet
avatar saraheagle
saraheagle
3 Feb 2023

Steps to reproduce the issue

1 - Create a menu item to a category blog page
2 - Set 'Intro Text' to 'hide'

Expected result

Intro text is not loaded

Actual result

Intro text is loaded

System information (as much as possible)

J The currently installed Joomla! version is "‎4.2.6"

Additional comments

components/com_content/tmpl/category/blog_item.php
<?php echo $this->item->introtext; ?>

Change to

	`<?php if ($this->params->get('show_intro', '1') == '1') : ?>
		<?php echo $this->item->introtext; ?>
	<?php endif; ?>`

Also I think
<?php if (!$params->get('show_intro')) : ?> <?php // Content is generated by content plugin event "onContentAfterTitle" ?> <?php echo $this->item->event->afterDisplayTitle; ?> <?php endif; ?>
Should be
`params->get('show_intro', '1') == '1') : ?>

		<?php echo $this->item->event->afterDisplayTitle; ?>
	<?php endif; ?>`

????
Thanks :)

avatar saraheagle saraheagle - open - 3 Feb 2023
avatar saraheagle saraheagle - change - 3 Feb 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 3 Feb 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Feb 2023
avatar saraheagle saraheagle - change - 3 Feb 2023
The description was changed
avatar saraheagle saraheagle - edited - 3 Feb 2023
avatar Fedik
Fedik - comment - 3 Feb 2023

If I right remamber, that option is for hide the Intro in Article detail view only. So you have "Intro" on Blog view, and rest of article in a detail view.

avatar brianteeman
brianteeman - comment - 3 Feb 2023

The option to show/hide the intorotext refers to if it should be shown on the full article view after clicking on readmorFor example if you have a movie review website you may show a precis of the movie on the blog view and then hide that precis when you click through to the full page view

avatar saraheagle
saraheagle - comment - 3 Feb 2023

It is confusing, maybe the wording "Intro Text" should be "Intro Text on Full Article"?

avatar brianteeman
brianteeman - comment - 3 Feb 2023

The description for the blog menu item type is "displays article introductions"
image

What is it you are actually trying to do? Sounds like you are perhaps trying to display the article title, image and readmore link only. If so then you dont need to create any introtext at all in your article and just add the readmore at the top of the article. OR do a template override to remove the line
<?php echo $this->item->introtext; ?>

avatar saraheagle
saraheagle - comment - 6 Feb 2023

Yes, that is true. It's just there isn't a way from a menu item to have a link to articles in a category and just have their images, without the introtext, without using a module. I think this is quite a basic requirement?? Quite often I would just visually hide the text, as it doesn't take much time to load, but on this particular site, there were about 50 pages that all had large image galleries in the intro text. In the end I moved the 'introtext' to the 'fulltext' in the database itself as luckily the 'fulltext' column was empty for that category.
It might be helpful to have two checkboxes, one to show the the blog introtext and one for the full page introtext?
Thanks very much for your help.

avatar brianteeman
brianteeman - comment - 6 Feb 2023

just create a template override. will take you two seconds

avatar brianteeman
brianteeman - comment - 6 Feb 2023

If tyou dont fancy doing that you can check out https://github.com/brianteeman/joomla-cards

avatar saraheagle
saraheagle - comment - 6 Feb 2023

I try not to use tempate overrides unless its absolutley necessary as they require checking regularly, I would rather use core layouts & css only. The cards are great :D Thanks very much.

avatar joomdonation joomdonation - change - 15 Feb 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-02-15 08:50:13
Closed_By joomdonation
avatar joomdonation
joomdonation - comment - 15 Feb 2023

Closing because this is not a core issue but the user misunderstand the parameter.

avatar joomdonation joomdonation - close - 15 Feb 2023

Add a Comment

Login with GitHub to post a comment