6

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?

1 Answer 1

4

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?

1
  • Yes, delivery for one single record and deliverys for multiple records. Aug 10, 2015 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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