How can I display the links A B C on the category blog? Topic is solved

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
GillianBPP
Joomla! Explorer
Joomla! Explorer
Posts: 301
Joined: Wed Oct 01, 2014 10:25 am

How can I display the links A B C on the category blog?

Post by GillianBPP » Fri Jan 21, 2022 6:29 pm

I am using a custom blog override (called 'gallery') to display a gallery of images for each year. The images are added in the article's 'Images and Links' tab, together with captions and, occasionally, a link to another page or external site to expand on the story in the 'Link A' section. Or at least, that's what I intended. The article titles are not displayed or linked as there is nothing futher for anyone to see. But 'Link A' does not display in the blog layout.

NB: The reason for using the Images and Links tab, rather than the editor, is to make it easier for my non-techy clients to add their own images and captions, field by field.

I had hoped that Link A would appear with the image and caption, as it is all set up in the same tab, but no, it only appears if you click on a linked article title (which I set to 'linked' for testing purposes), at which point all I'm presented with is the article title and 'Link A'.

So, I thought I'd grab the code from the article display, which I believe to be this:

Code: Select all

	<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
	<?php echo $this->loadTemplate('links'); ?>
	<?php endif; ?>
and added it to my 'gallery_item.php but that doesn't work.

I then tried just this:

Code: Select all

	<?php echo $this->loadTemplate('links'); ?>
but that doesn't work, either.

Is there any way to achieve what I'm looking for?

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: How can I display the links A B C on the category blog?

Post by brian » Fri Jan 21, 2022 9:03 pm

loadTemplate('links') is the file category/blog_links.php as you are in a category view and thats nothing to do with the links in an article.

what you are looking for is a means to get the aticle/default_links.php into the output of the category/blog_item.php

You can probably just copy the contents of that file and paste it into the blog_item.php - not tested but it will probably work.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

GillianBPP
Joomla! Explorer
Joomla! Explorer
Posts: 301
Joined: Wed Oct 01, 2014 10:25 am

Re: How can I display the links A B C on the category blog?

Post by GillianBPP » Sat Jan 22, 2022 11:43 am

brian wrote:
Fri Jan 21, 2022 9:03 pm
what you are looking for is a means to get the aticle/default_links.php into the output of the category/blog_item.php

You can probably just copy the contents of that file and paste it into the blog_item.php - not tested but it will probably work.
Indeed it does. Perfect! Thank you very much.


Post Reply

Return to “Administration Joomla! 4.x”