Templater Array Results - Linking to Specific Subfolders

What I’m trying to do

Hi all! I’m using the following Templater code to create an array that lists all the days in a given Month. Any existing Daily Notes properly appear in the array results. So far so good!

The problem arises when there is no existing Daily Note for a particular day in the array. When I click on the link of said array results, it creates an entirely new Note (under the Vault’s Root folder).

Instead, I would like to have the newly created Note properly be placed into the following subfolder: JOURNAL/DAILY NOTES.

The code so far:

<%* const currentDays = new Array(Math.ceil(moment.duration(moment(tp.file.title,'MM.MMMM').daysInMonth(), "days").asDays())).fill(null).map((x, i) => moment(tp.file.title,'MM.MMMM').startOf('month').add(i,'days').format("[[[]YYYY.MM.DD.dddd[ ]]]")).join(' | ') %> <%* tR += currentDays %>

I’ve tried searching this forum for answers, but to no avail. Hoping someone can help. Thanks!

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