1 - Create a menu item to a category blog page
2 - Set 'Intro Text' to 'hide'
Intro text is not loaded
Intro text is loaded
J The currently installed Joomla! version is "4.2.6"
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 :)
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
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
It is confusing, maybe the wording "Intro Text" should be "Intro Text on Full Article"?
The description for the blog menu item type is "displays article introductions"
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; ?>
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.
just create a template override. will take you two seconds
If tyou dont fancy doing that you can check out https://github.com/brianteeman/joomla-cards
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.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-15 08:50:13 |
Closed_By | ⇒ | joomdonation |
Closing because this is not a core issue but the user misunderstand the parameter.
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.