{"id":229,"date":"2016-02-14T05:43:49","date_gmt":"2016-02-14T05:43:49","guid":{"rendered":"https:\/\/maximoconcepts.wordpress.com\/?p=229"},"modified":"2016-02-14T05:43:49","modified_gmt":"2016-02-14T05:43:49","slug":"adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset","status":"publish","type":"post","link":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/","title":{"rendered":"Adding custom attribute to asset template and copying it to the asset"},"content":{"rendered":"

When it comes to adding a custom attribute to asset template and getting it copied to the asset, one might think that this may require extending the asset template class and adding the code to get the field copied or probably configuring a cross over domain. But its way easier than that!<\/p>\n

Just creating the custom attribute in asset template and in asset with the same name gets the job done. When the asset is created from the asset template, the data from\u00a0the custom field in asset template gets copied over to the field with the same name in asset. I did a quick check on this and it works as expected. Have a look –<\/p>\n

\"2016-02-14<\/p>\n

\"2016-02-14<\/p>\n

\"2016-02-14<\/p>\n","protected":false},"excerpt":{"rendered":"

When it comes to adding a custom attribute to asset template and getting it copied to the asset, one might think that this may require extending the asset template class and adding the code to get the field copied or probably configuring a cross over domain. But its way easier than that! Just creating the … Continue reading Adding custom attribute to asset template and copying it to the asset<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11,5],"tags":[],"yoast_head":"\nAdding custom attribute to asset template and copying it to the asset - Maximo Concepts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding custom attribute to asset template and copying it to the asset - Maximo Concepts\" \/>\n<meta property=\"og:description\" content=\"When it comes to adding a custom attribute to asset template and getting it copied to the asset, one might think that this may require extending the asset template class and adding the code to get the field copied or probably configuring a cross over domain. But its way easier than that! Just creating the … Continue reading Adding custom attribute to asset template and copying it to the asset\" \/>\n<meta property=\"og:url\" content=\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\" \/>\n<meta property=\"og:site_name\" content=\"Maximo Concepts\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-14T05:43:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png\" \/>\n<meta name=\"author\" content=\"Pranjal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pranjal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\"},\"author\":{\"name\":\"Pranjal\",\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b\"},\"headline\":\"Adding custom attribute to asset template and copying it to the asset\",\"datePublished\":\"2016-02-14T05:43:49+00:00\",\"dateModified\":\"2016-02-14T05:43:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\"},\"wordCount\":128,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b\"},\"image\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png\",\"articleSection\":[\"Configuration\",\"Technical\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\",\"url\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\",\"name\":\"Adding custom attribute to asset template and copying it to the asset - Maximo Concepts\",\"isPartOf\":{\"@id\":\"https:\/\/maximoconcepts.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png\",\"datePublished\":\"2016-02-14T05:43:49+00:00\",\"dateModified\":\"2016-02-14T05:43:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage\",\"url\":\"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png\",\"contentUrl\":\"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/maximoconcepts.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding custom attribute to asset template and copying it to the asset\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/maximoconcepts.com\/#website\",\"url\":\"https:\/\/maximoconcepts.com\/\",\"name\":\"Maximo Concepts\",\"description\":\"Concepts Simplified.\",\"publisher\":{\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/maximoconcepts.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b\",\"name\":\"Pranjal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/maximoconcepts.com\/wp-content\/uploads\/2015\/08\/dscn4443-2.jpg?fit=516%2C520&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/maximoconcepts.com\/wp-content\/uploads\/2015\/08\/dscn4443-2.jpg?fit=516%2C520&ssl=1\",\"width\":516,\"height\":520,\"caption\":\"Pranjal\"},\"logo\":{\"@id\":\"https:\/\/maximoconcepts.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/maximoconcepts.com\/author\/pranjal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding custom attribute to asset template and copying it to the asset - Maximo Concepts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/","og_locale":"en_GB","og_type":"article","og_title":"Adding custom attribute to asset template and copying it to the asset - Maximo Concepts","og_description":"When it comes to adding a custom attribute to asset template and getting it copied to the asset, one might think that this may require extending the asset template class and adding the code to get the field copied or probably configuring a cross over domain. But its way easier than that! Just creating the … Continue reading Adding custom attribute to asset template and copying it to the asset","og_url":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/","og_site_name":"Maximo Concepts","article_published_time":"2016-02-14T05:43:49+00:00","og_image":[{"url":"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png"}],"author":"Pranjal","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pranjal","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#article","isPartOf":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/"},"author":{"name":"Pranjal","@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b"},"headline":"Adding custom attribute to asset template and copying it to the asset","datePublished":"2016-02-14T05:43:49+00:00","dateModified":"2016-02-14T05:43:49+00:00","mainEntityOfPage":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/"},"wordCount":128,"commentCount":0,"publisher":{"@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b"},"image":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage"},"thumbnailUrl":"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png","articleSection":["Configuration","Technical"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/","url":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/","name":"Adding custom attribute to asset template and copying it to the asset - Maximo Concepts","isPartOf":{"@id":"https:\/\/maximoconcepts.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage"},"image":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage"},"thumbnailUrl":"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png","datePublished":"2016-02-14T05:43:49+00:00","dateModified":"2016-02-14T05:43:49+00:00","breadcrumb":{"@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#primaryimage","url":"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png","contentUrl":"https:\/\/maximoconcepts.files.wordpress.com\/2016\/02\/2016-02-14-10_52_35-asset-templates.png"},{"@type":"BreadcrumbList","@id":"https:\/\/maximoconcepts.com\/2016\/02\/14\/adding-custom-attribute-to-asset-template-and-coping-it-to-the-asset\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/maximoconcepts.com\/"},{"@type":"ListItem","position":2,"name":"Adding custom attribute to asset template and copying it to the asset"}]},{"@type":"WebSite","@id":"https:\/\/maximoconcepts.com\/#website","url":"https:\/\/maximoconcepts.com\/","name":"Maximo Concepts","description":"Concepts Simplified.","publisher":{"@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/maximoconcepts.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/2a0ce61af426d0c4038aeaa51cb0f98b","name":"Pranjal","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/maximoconcepts.com\/wp-content\/uploads\/2015\/08\/dscn4443-2.jpg?fit=516%2C520&ssl=1","contentUrl":"https:\/\/i0.wp.com\/maximoconcepts.com\/wp-content\/uploads\/2015\/08\/dscn4443-2.jpg?fit=516%2C520&ssl=1","width":516,"height":520,"caption":"Pranjal"},"logo":{"@id":"https:\/\/maximoconcepts.com\/#\/schema\/person\/image\/"},"url":"https:\/\/maximoconcepts.com\/author\/pranjal\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/posts\/229"}],"collection":[{"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/comments?post=229"}],"version-history":[{"count":0,"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/posts\/229\/revisions"}],"wp:attachment":[{"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/media?parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/categories?post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/maximoconcepts.com\/wp-json\/wp\/v2\/tags?post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}