I am using the SOAP function GetAssetAvailableKeywords and it works great when I use it for an asset ID that is something like an image, which is correctly returns standard asset keywords, and the image asset specific keywords.
My question is specific to Type Format assets. Normally in Matrix, if I edit the Type Format for something like an Image, I will get a keyword dropdown that lists the keywords available for that type format, which is for images.
With the SOAP function, when I am editing a Type Format, I can pass in that ID to the function, and I only get back standard asset keywords, not asset specific ones. While I understand the logic of why this happens, I am wondering how the Matrix _admin interface gets around this. Shouldn't GetAssetAvailableKeywords also return the asset specific keywords corresponding to the Type Format?
If not, is there a SOAP function that shows what kind of asset the Type Format is associated with?
SOAP GetAssetAvailableKeywords for Type Format Assets
Hi Nic,
Matrix on admin interface or on the simple edit interface does a event broadcat to do a requestKeyword (done by bodycopy container). This is listened by Event Manager and a function onRequestKeyword() is called, say, in Listing_Engine. And this is where the "extra" keywords are added.
I don't think that any of the API will let you do this directly in a single function call.
The other alternative would be to get the parent asset to where this Type Format bodycopy is linked under. In our case the Asset listing Page. Once you have the listing asset you should be able to find (from the attribute: 'types') what are the assets being listed and request a list of their keywords.
Hope this helps.
Ash
[quote]
Matrix on admin interface or on the simple edit interface does a event broadcat to do a requestKeyword (done by bodycopy container). This is listened by Event Manager and a function onRequestKeyword() is called, say, in Listing_Engine. And this is where the "extra" keywords are added.
[/quote]
Interesting. So does it do a lookup to its parent or something? How does the Event Manager know what kind of asset to generate keywords for?
[quote]
The other alternative would be to get the parent asset to where this Type Format bodycopy is linked under. In our case the Asset listing Page. Once you have the listing asset you should be able to find (from the attribute: 'types') what are the assets being listed and request a list of their keywords.
[/quote]
This is a good option, I think I will go this route. Thanks!
[quote]
Interesting. So does it do a lookup to its parent or something? How does the Event Manager know what kind of asset to generate keywords for?
[/quote]
The Event manager doesn't know about the asset which is configured on the Asset listing. It only knows about the Bodycopy Container. The like between the Type format Folder and the Bodycopy has link value of the asset type. Thats where the Asset listing know whats the asset in question.
So instead of, as earlier suggested, getting the parent listing page asset and then trying to get attribute to figure out the asset we want keywords for, this link value option seems a bit easier and rather straight forward.
Ash
[quote]So instead of, as earlier suggested, getting the parent listing page asset and then trying to get attribute to figure out the asset we want keywords for, this link value option seems a bit easier and rather straight forward.
[/quote]
This would be a great way to do it, but as I just realized, the GetAssetAvailableKeywords needs an asset ID rather than a type code. So, I feel like I am out of luck getting it working how I was hoping.
Hi Nic,
The GetAssetAvailableKeywords() SOAP API shouldn't really need an asset ID to get keywords, i suppose it can do the job with either an assetid, or a type code provided.
I will fix the API function, so you can keep going this way.
http://bugs.matrix.squiz.net/view_bug.php?bug_id=6005
http://public-cvs.squiz.net/cgi-bin/viewvc.cgi/web_services/api/soap_api_asset_service/soap_api_asset_service.inc?root=matrix_packages_web_services&r1=1.27.2.1&r2=1.27.2.2
regenrate wsdl after patch.
[quote]
http://bugs.matrix.squiz.net/view_bug.php?bug_id=6005
http://bugs.matrix.squiz.net/view_bug.php?bug_id=6005
regenrate wsdl after patch.
[/quote]
Thanks, this is great. These are the kind of changes that need to have version numbers indicated in the manuals. Especially for the API’s.
Appreciate it.