5

Is there a built in functionality available in joomla to determine the view name to plural?

I created 2 views as 'delivery' and 'deliverys'. The view 'delivery' is to display the records in a list view using default.php and the view 'deliverys' is to display one single records using edit.php.

When I hit the cancel button in the list view it redirects to a view called 'deliveries' and since I have the view name as 'deliverys' it says view not found.

Just want to understand is this a built in feature in Joomla to determine the plural name for a given view?

2

Yes, there is. Take a look at this if statement in JControllerForm class.

So to redirect to deliverys, you have to add property

protected $view_list = 'deliverys';

in your controller. If this dosen't exist, Joomla! tries to determine view name by itself.

And ofcourse, other solution would be to rename your view.

I think you have delivery view for one record and deliverys for list view, not vice versa?

  • Yes, delivery for one single record and deliverys for multiple records. – Malaiselvan Aug 10 '15 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.