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

RSS list page. #661

Closed
tzyganu opened this issue Sep 10, 2014 · 2 comments
Closed

RSS list page. #661

tzyganu opened this issue Sep 10, 2014 · 2 comments
Assignees

Comments

@tzyganu
Copy link
Contributor

tzyganu commented Sep 10, 2014

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.

@verklov
Copy link
Contributor

verklov commented Sep 10, 2014

@tzyganu, thanks for the ticket! I will ask the architect to review your suggestion!

@verklov
Copy link
Contributor

verklov commented Sep 22, 2014

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!

@verklov verklov closed this as completed Sep 22, 2014
okorshenko pushed a commit that referenced this issue Oct 21, 2015
[Merchant Beta][Vanilla] Bugfixes
okorshenko pushed a commit that referenced this issue Dec 14, 2016
Fixed issue:
 - MAGETWO-62032: Empty default website error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants