Hypervisor Posted December 2, 2020 Posted December 2, 2020 (edited) I see in the databases -> field section of the admin panel a note that indicates you can use something like the following: {$row->customFieldDisplayByKey('my-key', 'listing')|raw} I have no idea where these methods are documented? Can someone point me in the right direction? The developer docs are like "how to" guides... I'm looking for the actual API documentation and I have never had such a hard time finding API references. Thanks in advance! Edited December 2, 2020 by Hypervisor
Morrigan Posted December 2, 2020 Posted December 2, 2020 (edited) So you've looked at this: https://invisioncommunity.com/developers/rest-api ??? Or are you looking for help with templates because that's a template tag. Edited December 2, 2020 by Morrigan Hypervisor 1
Hypervisor Posted December 2, 2020 Author Posted December 2, 2020 13 minutes ago, Morrigan said: So you've looked at this: https://invisioncommunity.com/developers/rest-api ??? Or are you looking for help with templates because that's a template tag. Hi Morrigan! Thank you for your reply. I have seen the REST API documentation and it definitely is useful and what I need for certain tasks. I'm more-so confused on the template tags, PHP calls, etc. I can't find where the API docs are for those two categories. The only API docs I've actually been able to find are the REST ones you linked to. I've been doing full-stack work for 6 years so I feel kind of dumb not being able to find the information for which I'm looking. I would imagine it has to be out there somewhere as people develop custom plugins and applications for the IC suite, I must just be looking in the wrong places. Any further help would be greatly appreciated!
Morrigan Posted December 2, 2020 Posted December 2, 2020 I'll be honest I don't think the API calls the tags specifically but I don't know much about APIs. What you posted above would be used pretty much exclusively in Pages templates for databases: Pages > Templates > Database Templates I could be wrong but I believe that the API doesn't call those items. It would just call the custom field: So this: https://invisioncommunity.com/developers/rest-api?endpoint=cms/records/POSTitem Specifically: It will likely output the raw content of the field itself but I could be wrong. @bfarber ?????
Hypervisor Posted December 3, 2020 Author Posted December 3, 2020 4 hours ago, Morrigan said: I'll be honest I don't think the API calls the tags specifically but I don't know much about APIs. What you posted above would be used pretty much exclusively in Pages templates for databases: Pages > Templates > Database Templates I could be wrong but I believe that the API doesn't call those items. It would just call the custom field: So this: https://invisioncommunity.com/developers/rest-api?endpoint=cms/records/POSTitem Specifically: It will likely output the raw content of the field itself but I could be wrong. @bfarber ????? Thank you again for your response Morrigan! I think I'm doing a bad job at asking the question. I am familiar with the REST API and know that tags in the database page templates are distinct from that API. My question is focused primarily on how people know the tags or HTML template functions they have at their disposal without some sort of documentation of those calls. The code snippet I posted above was listed in the Admin CP but I'm sure there has to be many more calls similar to that which aren't listed in the Admin CP (I think?). If I wanted to start developing a plugin or application for the platform, I don't see where the platform is documented sufficiently to perform such a task but I see people doing it which leads me to believe I'm missing something. Again, thank you for your time and suffering through the poor explanation of my question. shaven 1
Morrigan Posted December 3, 2020 Posted December 3, 2020 OH! Okay. Well I don't know if the developer docs show much about theming. BUT! The help guides do! The code snippet you posted is JUST for pages and just for Pages templates as I explained about. When you make a plugin you create an array of data (probably through a query) so we'll say $myarray and so you'd be pulling the data from that. So it would be $myarray[thing1] or whatever. In the above you'll want to look specifically at "Template syntax". @Hypervisor Hypervisor 1
Hypervisor Posted December 8, 2020 Author Posted December 8, 2020 On 12/3/2020 at 10:30 AM, Morrigan said: OH! Okay. Well I don't know if the developer docs show much about theming. BUT! The help guides do! The code snippet you posted is JUST for pages and just for Pages templates as I explained about. When you make a plugin you create an array of data (probably through a query) so we'll say $myarray and so you'd be pulling the data from that. So it would be $myarray[thing1] or whatever. In the above you'll want to look specifically at "Template syntax". @Hypervisor Thank you so much!
Recommended Posts