{"action":"created","issue":{"url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/7","repository_url":"https://api.github.com/repos/backdrop-contrib/views_send","labels_url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/7/comments","events_url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/7/events","html_url":"https://github.com/backdrop-contrib/views_send/issues/7","id":143456178,"number":7,"title":"Naming of views and their variant displays.","user":{"login":"Graham-72","id":10559274,"avatar_url":"https://avatars.githubusercontent.com/u/10559274?v=3","gravatar_id":"","url":"https://api.github.com/users/Graham-72","html_url":"https://github.com/Graham-72","followers_url":"https://api.github.com/users/Graham-72/followers","following_url":"https://api.github.com/users/Graham-72/following{/other_user}","gists_url":"https://api.github.com/users/Graham-72/gists{/gist_id}","starred_url":"https://api.github.com/users/Graham-72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graham-72/subscriptions","organizations_url":"https://api.github.com/users/Graham-72/orgs","repos_url":"https://api.github.com/users/Graham-72/repos","events_url":"https://api.github.com/users/Graham-72/events{/privacy}","received_events_url":"https://api.github.com/users/Graham-72/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-25T08:42:52Z","updated_at":"2016-03-25T16:05:59Z","closed_at":null,"body":"Each view has a name and within a view there is one or more displays identified with a suffix like ':page' and ':page1'. The use of this colon would seem to be a problem because the view name is passed to the mail system and used to identify the template for the HTML body of the email.\r\n\r\nFor example, the template file names for use by the mimemail example module might be mimemail-message--test.tpl.php and mimemail-message--test2.tpl.php, where test and test2 identify specific templates to be used for the type of email.\r\n\r\nSo we need to modify the names used by views_send, in particular replacing the colon with perhaps a pair of hyphens.\r\n\r\nAt the same time, it would seem to be worthwhile to revise the use of view and display names within the config file views_send.settings.json, and also perhaps its structure."},"comment":{"url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/comments/201345660","html_url":"https://github.com/backdrop-contrib/views_send/issues/7#issuecomment-201345660","issue_url":"https://api.github.com/repos/backdrop-contrib/views_send/issues/7","id":201345660,"user":{"login":"Graham-72","id":10559274,"avatar_url":"https://avatars.githubusercontent.com/u/10559274?v=3","gravatar_id":"","url":"https://api.github.com/users/Graham-72","html_url":"https://github.com/Graham-72","followers_url":"https://api.github.com/users/Graham-72/followers","following_url":"https://api.github.com/users/Graham-72/following{/other_user}","gists_url":"https://api.github.com/users/Graham-72/gists{/gist_id}","starred_url":"https://api.github.com/users/Graham-72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graham-72/subscriptions","organizations_url":"https://api.github.com/users/Graham-72/orgs","repos_url":"https://api.github.com/users/Graham-72/repos","events_url":"https://api.github.com/users/Graham-72/events{/privacy}","received_events_url":"https://api.github.com/users/Graham-72/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T16:05:59Z","updated_at":"2016-03-25T16:05:59Z","body":"@hansfn - a bit more explanation of what I am attempting to do with this Backdrop version ...\r\n\r\nI am working towards it being able to use the custom themed mail option referred to in your quote from Mimemail. My aim is to have Views Send pass the name of the view to the mailsystem as the value of $key when assigned in the Drupal views_send.module at lines 1067 and 1124 where currently you have $key = 'direct';\r\n\r\nThere have to be some modifications within views_send.module in order to get the view name to this point in the code, but I believe I have found a way to do this, and I have prototype code working.\r\n\r\nI am also finding it necessary to make small modifications to the Mimemail module in order to fit with my understanding of how to use Backdrop's config file system.mail.json\r\n\r\nReviewing the use of this config file has given me major doubts about what the Mailsystem module is doing, and I am working on a much simplified version that I have called Simple_mailsystem.\r\n\r\nAs I see it, the main things I need to do with this port of views_send are now:\r\n\r\n1.  when assigning the name of the view to $key as referred to above, I need to replace the colon with a hyphen in order that it can be used as a template name such as mimemail-message--views_send--[key].tpl.php\r\n\r\n2.  for better understanding, I must improve the naming of config variables in Backdrop's file views_send.settings.json which has entries as shown below in my initial port of the module.\r\n`\r\n \"views_send_from_name_test_views_send:page\": \"Graham Oliver\",\r\n    \"views_send_from_mail_test_views_send:page\": \"graham@oliverweb.net\",\r\n    \"views_send_tokens_test_views_send:page\": {\r\n        \"node_title_pos_1\": \"title\",\r\n        \"node_uid_pos_2\": \"uid\",\r\n        \"field_email_pos_3\": \"field_email\",\r\n        \"field_name_pos_4\": \"field_name\"\r\n    },\r\n    \"views_send_to_name_test_views_send:page\": \"field_name_pos_4\",\r\n    \"views_send_to_mail_test_views_send:page\": \"field_email_pos_3\",\r\n    \"views_send_subject_test_views_send:page\": \"Test email\",\r\n    \"views_send_message_test_views_send:page\": {\r\n        \"value\": \"Testing\",\r\n        \"format\": \"plain_text\"\r\n    },\r\n    \"views_send_attachments_test_views_send:page\": \"\",\r\n    \"views_send_priority_test_views_send:page\": \"0\",\r\n    \"views_send_receipt_test_views_send:page\": 0,\r\n    \"views_send_headers_test_views_send:page\": \"\",\r\n    \"views_send_direct_test_views_send:page\": 1,\r\n    \"views_send_carbon_copy_test_views_send:page\": 0,\r\n    \"views_send_remember_test_views_send:page\": 1\r\n}\r\n`\r\n\r\nAlthough this works, I am hoping to make it easier to read and understand.\r\n\r\nI will be glad to read any comments you may wish to make. I am hoping that very soon I can be ready to commit some changes."}}