Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
If I want to output the attribute name via HTL, how do I go about doing this?
For example I want to be able to specify the meta tag as either <meta name=.. or <meta property=....
When I try this...
<meta ${metadata.metaTypeName}="${metadata.metaTypeNameValue}" content="${metadata.metaContentValue}" />
It renders in the HTML source as...
<meta ${metadata.metaTypeName}="metaTypeNameValue1" content="contentValue1"/>
The second two properties render fine, but the first one isn't getting evaluated. Any thoughts?
Solucionado! Ir para a Solução.
Visualizações
respostas
Total de curtidas
You can pass in a Map to data-sly-attribute, that should do the trick.
To set multiple attributes, pass a map object hold key-value pairs corresponding to the attributes and their values. For example, assuming,
attrMap = {
|
Then,
< div data-sly-attribute = "${attrMap}" ></ div > |
Visualizações
respostas
Total de curtidas
Check the Spec to gain access to objects -- htl-spec/SPECIFICATION.md at master · Adobe-Marketing-Cloud/htl-spec · GitHub
Are you referencing a valid object.
Visualizações
respostas
Total de curtidas
Yes, I'm referencing a valid object. It seems like it might have something to do with updating an attribute name, as the other attribute values are working fine. Let me know if you have any other thoughts.
Visualizações
respostas
Total de curtidas
Hi Joshua,
data-sly-attribute at https://docs.adobe.com/docs/en/htl/docs/block-statements.html might help.
Thanks,
Visualizações
respostas
Total de curtidas
You can pass in a Map to data-sly-attribute, that should do the trick.
To set multiple attributes, pass a map object hold key-value pairs corresponding to the attributes and their values. For example, assuming,
attrMap = {
|
Then,
< div data-sly-attribute = "${attrMap}" ></ div > |
Visualizações
respostas
Total de curtidas
That worked. Thanks Feike!
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas