Trying to do something with Templater

Hi.
I’m trying to create a template with this in mind.

First i create a file with this estructure: @ name last_name.md

and then apply this template:

what i do is take the name of the file and eliminate the character “@” and then the result i put it in the yalm section

the other part is the same but i use it as a tittle

---
Autor: <%* if(tp.file.title.charAt(0) == "@") { const a = tp.file.title; const b = a.replace("@",""); tR = b }%>
Tags: autores
---

<%* if(tp.file.title.charAt(0) == "@") { const a = tp.file.title; const b = a.replace("@",""); tR = "#" + b }%>

## Biografía

## Libros

### Leidos
#todo/Lecturas 
- [ ] 

### Interesante


---
VOLVER: [[_Autores_]]
TAGS: #autores 

this is my result

why i can’t see the YALM part?

Thanks

Maybe try, in your templater code, using tR += … instead of tR = …, which would append instead of replacing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.