Created
July 6, 2012 00:46
-
-
Save LinzardMac/3057345 to your computer and use it in GitHub Desktop.
Pods Package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"meta":{"version":"1.14.2","build":"1341535543"},"pods":{"4":{"name":"bunnies","label":"Bunny","is_toplevel":"1","detail_page":"bunnies\/{@slug}\/","list_filters":null,"pre_save_helpers":"","pre_drop_helpers":"","post_save_helpers":"","post_drop_helpers":"","fields":[{"name":"name","label":"Name","comment":"","coltype":"txt","pickval":null,"weight":"0","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"1","unique":null,"multiple":null},{"name":"slug","label":"Permalink","comment":"Leave blank to auto-generate","coltype":"slug","pickval":null,"weight":"1","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"0","unique":null,"multiple":null},{"name":"birthday","label":"Birth Date","comment":"When was your bunny born?","coltype":"date","pickval":"","weight":"2","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"featured","label":"Featured","comment":"Want to feature this bunny?","coltype":"bool","pickval":"","weight":"3","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"bio","label":"Bio","comment":"Tell us about your bunny","coltype":"desc","pickval":"","weight":"4","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"code","label":"Code","comment":"","coltype":"code","pickval":"","weight":"5","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"photo","label":"Photo","comment":"","coltype":"file","pickval":"","weight":"6","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"},{"name":"color","label":"Color","comment":"","coltype":"pick","pickval":"color","weight":"7","display_helper":"","input_helper":"","pick_filter":"","pick_orderby":"","required":"0","unique":"0","multiple":"0"}]},"5":{"name":"color","label":"Color","is_toplevel":"1","detail_page":"","list_filters":null,"pre_save_helpers":"","pre_drop_helpers":"","post_save_helpers":"","post_drop_helpers":"","fields":[{"name":"name","label":"Name","comment":"","coltype":"txt","pickval":null,"weight":"0","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"1","unique":null,"multiple":null},{"name":"slug","label":"Permalink","comment":"Leave blank to auto-generate","coltype":"slug","pickval":null,"weight":"1","display_helper":null,"input_helper":null,"pick_filter":null,"pick_orderby":null,"required":"0","unique":null,"multiple":null}]}},"templates":[{"name":"bunnies_list","code":"<div style=\"padding:10px; border: 6px solid grey; margin:10px; width: 250px; text-align:center;\" > <img src=\"{@photo.guid}\" width=\"200\"\/><\/br> <a href=\"{@detail_url}\">{@name}<\/a><\/div>"},{"name":"bunnies_detail","code":"<div style=\"padding: 10px; border: 6px solid grey; margin: 10px; width: 250px; text-align: center;\" > \n\n<img src=\"{@photo.guid}\" width=\"200\" style=\"float:left; padding: 10px\"\/>\n<h3>{@name}'s Stats<\/h3>\n<ul style=\"text-align:left;\"> <li> {@birthday} <\/li> \n<li>{@featured}<\/li> \n<li>{@bio}<\/li> \n<li> {@color, array_display_color}<\/li> \n<\/ul>\n\n<?php esc_html( $this->get_field( 'code' ) ); ?>\n\n<\/div>"}],"pod_pages":[{"uri":"bunnies","title":"","phpcode":"<h1>Bunnies<\/h2>\n<?php\n$pods = new Pod('bunnies');\n$pods->findRecords('t.name' , -1);\necho $pods->showTemplate('bunnies_list');\n?>","precode":"","page_template":""},{"uri":"bunnies\/*","title":"{@name}","phpcode":"<?php \nglobal $pods;\n$pods->findRecords('t.name' , -1);\necho $pods -> showTemplate('bunnies_detail');","precode":"<?php\n$slug = pods_url_variable(2); \n$pods =new Pod('bunnies' , $slug);\n?>\n<?php\nif(empty($pods -> data))\n{\nwp_redirect ('..\/');\ndie();\n}\n?>","page_template":""},{"uri":"bunnies\/public","title":"","phpcode":"<?php\n$pods = new Pod('bunnies');\n$pods->publicForm();\n?>","precode":"","page_template":""},{"uri":"bunnies\/edit","title":"","phpcode":"<?php\n$pods = new Pod('bunnies', 'thumper');\n$pods->publicForm();\n?>","precode":"","page_template":""}],"helpers":[{"name":"array_display_color","helper_type":"display","phpcode":"<?php\nif ($value)\n{\n foreach ($value as $v)\n {\n echo '<a href=\"medteam\/bunnies\/'.$v['slug'].' \">'.$v['name'].'<\/a>';\n }\n}\n?>"}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment