Separate URL and view for item type=X


#1

I think this is a better question for Development than Themes.

For testing purposes, I’ve added a new route directly in application/config/routes.ini.

person.route = ":controller/person/:page"
person.defaults.controller = items
person.defaults.action = browse
person.reqs.page = “\d+”

This has the effect of enabling:
http://edison.rutgers.edu/digital/items/person (which you can see live)

My problem is getting a view associated with it. I understand it is related to Zend framework, routing, controller, action, etc… just don’t have enough knowledge yet to solve on my own. I think I am getting close.

I’ve added a copy of browse.php in /themes/seasons/items, as person.php. I modified the title and a few things just to test.

After this didn’t work, I also added person.php to the core application views, but no luck there.

After further research, I looked into application/controllers/ItemsController.php to find where the link is from routes to controller to the view file - in the case of http://site/omeka/browse/items, I expected to find some function pointing the controller to the browse.php file - but couldn’t find that. I see references in the forums and other posts to showAction() and browseAction() being associated with the route configuration settings - person.defaults.action = browse >> browseAction() or something like that. But again, I couldn’t find any functions that were providing the link.

If anyone has any thoughts, thanks! I’ll be continuing to Google it today.