{"action":"created","issue":{"url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/2","labels_url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/2/comments","events_url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/2/events","html_url":"https://github.com/Giuseppe-Mazzapica/ATP/issues/2","id":55942291,"number":2,"title":"templates in subdirectories not loaded via ATP, forward slashes stripped in request","user":{"login":"richardtape","id":116946,"avatar_url":"https://avatars.githubusercontent.com/u/116946?v=3","gravatar_id":"","url":"https://api.github.com/users/richardtape","html_url":"https://github.com/richardtape","followers_url":"https://api.github.com/users/richardtape/followers","following_url":"https://api.github.com/users/richardtape/following{/other_user}","gists_url":"https://api.github.com/users/richardtape/gists{/gist_id}","starred_url":"https://api.github.com/users/richardtape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardtape/subscriptions","organizations_url":"https://api.github.com/users/richardtape/orgs","repos_url":"https://api.github.com/users/richardtape/repos","events_url":"https://api.github.com/users/richardtape/events{/privacy}","received_events_url":"https://api.github.com/users/richardtape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T19:08:50Z","updated_at":"2015-01-29T20:50:02Z","closed_at":null,"body":"Hi Giuseppe,\r\n\r\nFirstly, thanks so much for this, it is *awesome*.\r\n\r\nI've come across a slight issue with regards to loading template files that are in sub directories. get_template_part() allows you to pass a path as the first argument. i.e.\r\n\r\n```php\r\nget_template_part( 'templates/tha_entry_top/entry', 'test' );\r\n```\r\n\r\nwould load a file called `entry-test.php` in my theme's templates/tha_entry_top/ directory.\r\n\r\nHowever, it appears that THA strips the forward slashes. I tried both\r\n\r\n```php\r\najax_template_part( 'templates/tha_entry_top/entry', 'test' );\r\n```\r\nand\r\n```php\r\najax_template_part( 'templates\\/tha_entry_top\\/entry', 'test' );\r\n```\r\n\r\nto see if I could manually unescape them, but both produced the following POST request form data;\r\n\r\n```\r\naction:ajaxtemplatepart\r\nfiles_data[ajaxtemplate-templatestha_entry_topentry-test-1][]:templatestha_entry_topentry\r\nfiles_data[ajaxtemplate-templatestha_entry_topentry-test-1][]:test\r\nposts_data[ajaxtemplate-templatestha_entry_topentry-test-1]:1\r\n```\r\n\r\nWhich, naturally, leads to the template not loading.\r\n\r\nI'm a bit of a sucker for having a clean theme root directory, so I'd absolutely love ATP to allow templates to be loaded from sub directories. Again, thanks so much for writing this. It. Is. Awesome."},"comment":{"url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/comments/72101402","html_url":"https://github.com/Giuseppe-Mazzapica/ATP/issues/2#issuecomment-72101402","issue_url":"https://api.github.com/repos/Giuseppe-Mazzapica/ATP/issues/2","id":72101402,"user":{"login":"Giuseppe-Mazzapica","id":2208282,"avatar_url":"https://avatars.githubusercontent.com/u/2208282?v=3","gravatar_id":"","url":"https://api.github.com/users/Giuseppe-Mazzapica","html_url":"https://github.com/Giuseppe-Mazzapica","followers_url":"https://api.github.com/users/Giuseppe-Mazzapica/followers","following_url":"https://api.github.com/users/Giuseppe-Mazzapica/following{/other_user}","gists_url":"https://api.github.com/users/Giuseppe-Mazzapica/gists{/gist_id}","starred_url":"https://api.github.com/users/Giuseppe-Mazzapica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Giuseppe-Mazzapica/subscriptions","organizations_url":"https://api.github.com/users/Giuseppe-Mazzapica/orgs","repos_url":"https://api.github.com/users/Giuseppe-Mazzapica/repos","events_url":"https://api.github.com/users/Giuseppe-Mazzapica/events{/privacy}","received_events_url":"https://api.github.com/users/Giuseppe-Mazzapica/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T20:50:02Z","updated_at":"2015-01-29T20:50:02Z","body":"Thanks @richardtape\r\n\r\nYep, plugin should definitely support templates in subfolders. I'll surely handle this issue in the weekend. Thanks for reporting."}}