0
votes

I created custom view using a tpl file which shows "No records found" if the query did not result any records. This works fine while looking at the preview of a view.But when i use the same view in a panel. I dont see "No records found" Its just a blank section of a panel. Why so? and how do i fix this?

2

2 Answers

1
votes

Well its way too simple than i thought. Under the "basic settings->Empty Text" of a view. Write your own TEXT/HTML/PHP/ code to show it when there are no records.

information: When there are no records to display in a view and if you are using that view in a panel,it completely ignores your custom view-*-.tpl.php file and will end up showing a blank screen.

0
votes

Add some text in the template file, that is always shown, to be sure, that the template is used.

Then, what is your if branch, where you check if the record list is empty?