Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] param show_cat_num_links_cat or show_cat_num_links ? #463

Closed
chmst opened this issue Sep 20, 2021 · 4 comments
Closed

[4.0] param show_cat_num_links_cat or show_cat_num_links ? #463

chmst opened this issue Sep 20, 2021 · 4 comments

Comments

@chmst
Copy link
Contributor

chmst commented Sep 20, 2021

Steps to reproduce the issue

https://forum.joomla.de/thread/14353-com-weblinks-ist-f%C3%BCr-version-3-und-4-neu-freigegeben/?postID=93269#post93269

param for number of links is set but not displayed

Expected result

Number of links is shown in view categories

Actual result

Number is missing

System information (as much as possible)

https://forum.joomla.de/thread/14353-com-weblinks-ist-f%C3%BCr-version-3-und-4-neu-freigegeben/?postID=93269#post93269

Additional comments

joomdonation added a commit that referenced this issue Sep 21, 2021
@joomdonation
Copy link
Contributor

Guess it causes by your copy/paste error while working on the layout. Could you please check and confirm this commit 8aa92f9 fixed it?

@chmst
Copy link
Contributor Author

chmst commented Sep 21, 2021

https://github.com/joomla-extensions/weblinks/blob/master/src/administrator/components/com_weblinks/config.xml#L316 it was caused from here. The two models for category and categies use different filters. So we should decide which name we use everywhere.

@joomdonation
Copy link
Contributor

The Categories model should use show_cat_num_links_cat parameter. The Category model will use show_cat_num_links parameter. That's same with how other core components work.

@Sieger66
Copy link

Sieger66 commented Sep 21, 2021

Could you please check and confirm this commit 8aa92f9 fixed it?

I have check and for me it fix it for the weblinks-categories-view. Thank you.

In the weblinks-category-view is the same problem because at
https://github.com/joomla-extensions/weblinks/blob/4.0-dev/src/components/com_weblinks/tmpl/category/default_children.php#L40

there is no code to display number of links as in joomla 3 Weblinks at:

https://github.com/joomla-extensions/weblinks/blob/3.9.0/src/components/com_weblinks/views/category/tmpl/default_children.php#L38-L43

My example:

<?php if ($this->params->get('show_cat_num_links') == 1) :?> <span class="weblink-count badge bg-info"> <?php echo JText::_('COM_WEBLINKS_NUM'); ?> <?php echo $child->numitems; ?> </span> <?php endif; ?>

or with other classes and html-tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants