{"action":"created","issue":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/8947","labels_url":"https://api.github.com/repos/Elgg/Elgg/issues/8947/labels{/name}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/8947/comments","events_url":"https://api.github.com/repos/Elgg/Elgg/issues/8947/events","html_url":"https://github.com/Elgg/Elgg/issues/8947","id":107006533,"number":8947,"title":"Figure out a way to list all views in a directory","user":{"login":"juho-jaakkola","id":883920,"avatar_url":"https://avatars.githubusercontent.com/u/883920?v=3","gravatar_id":"","url":"https://api.github.com/users/juho-jaakkola","html_url":"https://github.com/juho-jaakkola","followers_url":"https://api.github.com/users/juho-jaakkola/followers","following_url":"https://api.github.com/users/juho-jaakkola/following{/other_user}","gists_url":"https://api.github.com/users/juho-jaakkola/gists{/gist_id}","starred_url":"https://api.github.com/users/juho-jaakkola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juho-jaakkola/subscriptions","organizations_url":"https://api.github.com/users/juho-jaakkola/orgs","repos_url":"https://api.github.com/users/juho-jaakkola/repos","events_url":"https://api.github.com/users/juho-jaakkola/events{/privacy}","received_events_url":"https://api.github.com/users/juho-jaakkola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Elgg/Elgg/milestones/60","html_url":"https://github.com/Elgg/Elgg/milestones/Elgg%202.0.x","labels_url":"https://api.github.com/repos/Elgg/Elgg/milestones/60/labels","id":404754,"number":60,"title":"Elgg 2.0.x","description":"","creator":{"login":"ewinslow","id":356564,"avatar_url":"https://avatars.githubusercontent.com/u/356564?v=3","gravatar_id":"","url":"https://api.github.com/users/ewinslow","html_url":"https://github.com/ewinslow","followers_url":"https://api.github.com/users/ewinslow/followers","following_url":"https://api.github.com/users/ewinslow/following{/other_user}","gists_url":"https://api.github.com/users/ewinslow/gists{/gist_id}","starred_url":"https://api.github.com/users/ewinslow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewinslow/subscriptions","organizations_url":"https://api.github.com/users/ewinslow/orgs","repos_url":"https://api.github.com/users/ewinslow/repos","events_url":"https://api.github.com/users/ewinslow/events{/privacy}","received_events_url":"https://api.github.com/users/ewinslow/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":109,"state":"open","created_at":"2013-08-19T00:23:53Z","updated_at":"2015-09-20T20:14:32Z","due_on":"2015-09-19T21:00:00Z","closed_at":null},"comments":5,"created_at":"2015-09-17T15:09:48Z","updated_at":"2015-09-20T20:45:50Z","closed_at":null,"body":"Some plugins have the need to list all views located in a specific view directory. This is not possible anymore in Elgg 2.0 because the ```$CONFIG->viewpath``` value has been removed.\r\n\r\nIt would be nice to figure out either:\r\n - A new feature that does the job\r\n - Some kind of a workaround\r\n\r\n#### Example case:\r\n\r\n[Anypage](https://github.com/brettp/anypage) is [using](https://github.com/brettp/anypage/blob/1.9/classes/AnyPage.php#L394) the view location to list all layouts in ```views/default/page/layouts/```, so that user can use the layout of their choice with each anypage object.\r\n\r\n#### Some ideas:\r\n 1. A hook for defining available layouts (initial though is there aren't enough use cases to make it worth adding it)\r\n\r\n 2. This works (but is it safe?):\r\n```php\r\n$viewpath = dirname(elgg_get_engine_path()) . \"/views/default/\";\r\n```"},"comment":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/comments/141833076","html_url":"https://github.com/Elgg/Elgg/issues/8947#issuecomment-141833076","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/8947","id":141833076,"user":{"login":"mrclay","id":170687,"avatar_url":"https://avatars.githubusercontent.com/u/170687?v=3","gravatar_id":"","url":"https://api.github.com/users/mrclay","html_url":"https://github.com/mrclay","followers_url":"https://api.github.com/users/mrclay/followers","following_url":"https://api.github.com/users/mrclay/following{/other_user}","gists_url":"https://api.github.com/users/mrclay/gists{/gist_id}","starred_url":"https://api.github.com/users/mrclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrclay/subscriptions","organizations_url":"https://api.github.com/users/mrclay/orgs","repos_url":"https://api.github.com/users/mrclay/repos","events_url":"https://api.github.com/users/mrclay/events{/privacy}","received_events_url":"https://api.github.com/users/mrclay/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T20:45:50Z","updated_at":"2015-09-20T20:45:50Z","body":"@ewinslow are you against exposing this? If so, do you have any other ideas for this use case?"}}