Is it possible to get this block in HTML emails instead of just plain text ones?
Get triggering file structure in HTML email
Get triggering file structure in HTML email
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Get triggering file structure in HTML email
[Job.NestedName:Indent=" ",Separator=]
Freddy
Freddy
Get triggering file structure in HTML email
freddyp wrote: [Job.NestedName:Indent=" ",Separator=]
Freddy
Wonderful! Thanks so much. Works well in a :
<p>
<span style="font-size:14px;">File Structure</span><br>
<pre style="display: block;font-family: Consolas,monaco,monospace;white-space: pre; margin: 0;max-width: 500px;overflow: visible;">{% spaceless %}
[Job.NestedName:Indent="ÂÂÂÂ",Separator=<br>]
{% endspaceless %}</pre>
</p>
I don't suppose there is a way to get to the end of a line that is indented. For example, if I wanted to indent with a and then close that indention with a ? or possibly specify the end of an indented string (a folder) with a trailing slash (but not the files inside)? If not, no worries. This works well enough.
Freddy
Wonderful! Thanks so much. Works well in a :
<p>
<span style="font-size:14px;">File Structure</span><br>
<pre style="display: block;font-family: Consolas,monaco,monospace;white-space: pre; margin: 0;max-width: 500px;overflow: visible;">{% spaceless %}
[Job.NestedName:Indent="ÂÂÂÂ",Separator=<br>]
{% endspaceless %}</pre>
</p>
I don't suppose there is a way to get to the end of a line that is indented. For example, if I wanted to indent with a and then close that indention with a ? or possibly specify the end of an indented string (a folder) with a trailing slash (but not the files inside)? If not, no worries. This works well enough.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Get triggering file structure in HTML email
You can always write a script expression that uses s.getVariableAsString("[Job.NestedName]"). That returns the list of folders and files as a string, by default separated by a semi-colon and prefixed with 4 spaces per indentation level (I would change that to 1 space for what follows).
You can split the string to an array. You start off with an empty HTMLstring and you loop over the array and check if the indent level changes, ie the number of leading spaces changes. Here you see why I would use just 1 space: there is no point in counting by fours. A change of indent level is a trigger to insert (number of leading spaces goes up) or (number of leading spaces goes down).
At the end you return the HTML-formatted string. Note that "returning" a string in a script expression is not done by writing:
return HTMLstring;
but simply by writing:
HTMLstring;
If it is worth the trouble is your decision:)
Freddy
You can split the string to an array. You start off with an empty HTMLstring and you loop over the array and check if the indent level changes, ie the number of leading spaces changes. Here you see why I would use just 1 space: there is no point in counting by fours. A change of indent level is a trigger to insert (number of leading spaces goes up) or (number of leading spaces goes down).
At the end you return the HTML-formatted string. Note that "returning" a string in a script expression is not done by writing:
return HTMLstring;
but simply by writing:
HTMLstring;
If it is worth the trouble is your decision:)
Freddy