You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the template that lists the available RSS feeds, app/code/Magento/Rss/view/frontend/templates/list.phtml, there is this:
<?php if ($_categories || $_misc): ?>
CORE RSS FEEDS HERE
<?php else: ?>
<p><?php echo __('There are no Rss Feeds.'); ?></p>
<?php endif; ?>
This means that if there are no category feeds and no miscellaneous feeds the user sees a There are no Rss Feeds message.
but In the following scenario I think the message should not appear.
Let's say I have a custom module that contains one or more RSS feeds. And I want it displayed in the same page. I can do this by adding my own block with my own template in the content section of the page via a layout file.
But if I only want my RSS feeds enabled and all the core feeds disabled I see the message then my feeds listed below.
To avoid this, right now I have to change the template mentioned above.
I think there is a need for something like this:
<?php if ($_categories || $_misc): ?>
CORE RSS FEEDS HERE
<?php elseif(!$this->getHideEmptyMessage()): ?>
<p><?php echo __('There are no Rss Feeds.'); ?></p>
<?php endif; ?>
This way I can call $block->setHideEmptyMessage(true) on the block from one of my extension files and hide the message if needed. It does not have to be a real method. A magic getter/setter will do.
The text was updated successfully, but these errors were encountered:
Your suggested improvement has just been implemented internally and code changes merged to the code base. Please expect the change to be available with the next deployment of version 0.1.0-alpha97. We are closing this issue now. Thanks for your contribution!
In the template that lists the available RSS feeds,
app/code/Magento/Rss/view/frontend/templates/list.phtml
, there is this:This means that if there are no category feeds and no miscellaneous feeds the user sees a
There are no Rss Feeds
message.but In the following scenario I think the message should not appear.
Let's say I have a custom module that contains one or more RSS feeds. And I want it displayed in the same page. I can do this by adding my own block with my own template in the content section of the page via a layout file.
But if I only want my RSS feeds enabled and all the core feeds disabled I see the message then my feeds listed below.
To avoid this, right now I have to change the template mentioned above.
I think there is a need for something like this:
This way I can call
$block->setHideEmptyMessage(true)
on the block from one of my extension files and hide the message if needed. It does not have to be a real method. A magic getter/setter will do.The text was updated successfully, but these errors were encountered: