-
Notifications
You must be signed in to change notification settings - Fork 7
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
List view produce output even if no products #58
Comments
Maybe it is unnecessary in your case. However other websites need it this way. |
Not to be stubborn but just to understand... in which use case is needed to show what's inside ###ITEM_LIST_TEMPLATE### if there are no products to display? By instance: in the template shipped with tt_products, inside ###ITEM_LIST_TEMPLATE### and before ###ITEM_CATEGORY_AND_ITEMS### there is the list browser. But there's no need to display a list browser if there are no product to browse. In fact, using tt_products shipped templates with this patch and with no products, it outputs a meaningless If a website needs to display something when there's no product in a list there's the template ###ITEM_LIST_EMPTY###. So I can't imagine a use case where this patch is needed. Can you make an example please? |
I add that with that patch there's no way to avoid to output what's between ###ITEM_LIST_TEMPLATE### and ###ITEM_CATEGORY_AND_ITEMS###. In one of my use case I output the products in a table. This table has a header (column names) and it's between ###ITEM_LIST_TEMPLATE### and ###ITEM_CATEGORY_AND_ITEMS###. After this patch the user sees only the header when the page has no products. |
All these subparts are emptied:
This marker gets empty:
There is a case when a message has been written on the top of the list view. It is not wanted to write the same text again if there is an empty product list. Maybe another new subpart shall be added, e.b. ###ITEMS_FOUND### |
I don't understand this use case. When is this message displayed?
Solutions:
In any case there's no need of this patch. Or am I missing something? |
This patch will not be removed any more. This would break some shops. Only a new patch with conditions can be added. The ###ITEM_LIST_EMPTY### subpart is appended to the ##ITEM_LIST_TEMPLATE### subpart now. |
Ok, I got it. |
Make a simpler name as a proposal for TypoScript.
This will give the current behaviour. If no product is found, then the empty list will be added, If it is not set, then the empty list will be the only output. |
This commit f683f82 added lines from
tt_products/view/class.tx_ttproducts_list_view.php
Line 2425 in d51b437
tt_products/view/class.tx_ttproducts_list_view.php
Line 2433 in d51b437
The text was updated successfully, but these errors were encountered: