Questions tagged [html-template-directives]
The html-template-directives tag has no summary.
16 questions
1 vote
2 answers
1k views
Using the <template> vs <div> for conditional rendering
The Salesforce documentation states that lwc:if tags can be used with or or really any HTML tags. Is there a significant difference in functionality between adding a <template> vs a <div>...
2 votes
1 answer
1k views
dynamically constructing a URL in a LWC for:each section
I need the value attribute for a <lightning-formatted-url> in a for:each section of a LWC template to include the base url + a property from the current item, and I cannot figure out how this ...
0 votes
2 answers
1k views
Why does my array not show up in the template for:each?
I am trying to get a value from a list of objects to show up on the html page using the for:each directive. I have a then method that dynamically builds an array of objects that holds an id number and ...
1 vote
2 answers
7k views
LWC Template if:true Directive not working
I'm trying to conditionally hide the lightning-tab,using if:true directive .The "courses" array is populated or empty using @wire adaptor.I am trying to use if:true condition to check if ...
0 votes
0 answers
7k views
input type="date" shows "dd-mm-yyyy" for empty value
let's say i have <div class="slds-form-element__control"> <input type="date" id="form-element-expiration-date" ...
5 votes
3 answers
35k views
Is it possible to use expressions in if:true or if:false tag in LWC?
I have 8 parameters to render the elements conditionally, Is it possible to use expressions in if:true statement? for example: <template if:true={p1.data || p2.data || p3.data}> <!-- some ...
1 vote
1 answer
3k views
LWC conditional display on load of component not working
Based on the field values of the Account, I want to display/hide parts of the component when it loads for the first time. I have tried so many things unsuccessfully and am hoping someone can help me ...
0 votes
1 answer
6k views
Template marketing cloud: I would like to unlock full html, so that I can personnalize my template with class and tables
I used a marketing cloud template and I want to customize it with extra html (to make it render well on a specific email client). The thing is that when I click on code view > toggle 'show full ...