{"action":"created","issue":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/8486","labels_url":"https://api.github.com/repos/Elgg/Elgg/issues/8486/labels{/name}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/8486/comments","events_url":"https://api.github.com/repos/Elgg/Elgg/issues/8486/events","html_url":"https://github.com/Elgg/Elgg/issues/8486","id":88371208,"number":8486,"title":"Allow loading static views from .css and css/ views without elgg_get_simplecache_url","user":{"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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-15T09:34:35Z","updated_at":"2015-06-16T20:03:11Z","closed_at":null,"body":"Great suggestion from @hypeJunction.\r\n\r\nI've always thought the solution would ultimately be to use relative urls and then do some sort of pre-processing with the \"view,all\" hook to replace it with the full path. We could do this at view render time based on the name of the current view so that even if a view is appended to another (as many/most css views are), you still get intuitive rendering behavior.\r\n\r\nSuppose you have these three views:\r\n\r\n```php\r\n// css/elgg.php\r\necho elgg_view('css/elgg/button');\r\n```\r\n\r\n```css\r\n/* css/elgg/button.php */\r\n.elgg-button {\r\n  background-image: url(./button-background.jpg)\r\n}\r\n```\r\n\r\n```\r\n// css/elgg/button-background.png\r\n... some image file ...\r\n```\r\n\r\nYou don't want `css/elgg.php` to end up looking like this:\r\n```css\r\n/* Loaded from .../default/css/elgg */\r\n.elgg-button {\r\n  background-image: url(./button-background.jpg)\r\n}\r\n```\r\n\r\nBecause then the loaded URL would be `.../default/css/button-background.jpg`\r\ninstead of the intended `.../default/css/elgg/button-background.jpg`\r\n\r\nHoping that checking for relative URLs doesn't prove to be too difficult, otherwise this seems like a great feature that would allow us to get rid of the need for PHP CSS 99% of the time..."},"comment":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/comments/112552012","html_url":"https://github.com/Elgg/Elgg/issues/8486#issuecomment-112552012","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/8486","id":112552012,"user":{"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},"created_at":"2015-06-16T20:03:10Z","updated_at":"2015-06-16T20:03:10Z","body":"Or maybe we do as @mrclay says and just do nothing. After all if folks are updating their URLs to use relative URL references we can also just say that extending other css views and using relative URLs at the same time is not supported\r\n\r\nIs that what you meant, Steve?"}}