I recently had chance to implement an ECL provider using S3 bucket, See if this helps.
A quick note: GetTemplateFragment()
is responsible to return a string
format output that does not mean you return a plane string which can not be interpreted by your template.
See the code below:
public string GetTemplateFragment(IList<ITemplateAttribute> attributes)
{
string[] supportedAttributeNames = new[] { "style", "width", "height" };
string supportedAttributes = attributes.SupportedAttributes(supportedAttributeNames);
// since photos are already published, so we can provide a template fragment ourselves
return string.Format("<img src=\"{0}\" alt=\"{1}\" {2}/>", GetDirectLinkToPublished(attributes), Title, supportedAttributes);
}
Above code is taken from a working example, the return string here is an HTML (RTF) element.
So It does need to return string
but a Template fragment of the eclItems. Once your Resolve ECL items V2 TBB gets it in Template It actually creates a base64 version (I am not entirely sure but at least it did in my case) of the fragment..and render it to the page.
Also to answer this :
I've inserted various breakpoints and I never see a break at this method.
- Run your code using
TridionServiceHost
process
- Attach your ecl media to a
component
of a page
or something and publish
(this will call your methods, if not see next steep)
- Open
Template Builder
, attach your provider code with TcmTemplateDebugHost
and debug there.
If it still does not hit your code, then i am not sure what else is going wrong.. Refer the blog link mentioned above and see if you are missing on anything.
Hope this gives you some help!