Questions tagged [template-variables]

Template variables consist of any of various conventions for declaring, initializing, composing or evaluating variables and expressions within a template engine.

Overview

Template variables consist of any of various conventions for declaring, initializing, composing or evaluating variables and expressions with a

See also

55 questions
1
vote
1 answer

Why do I have to specialize recursive template variables?

So I wrote an answer here: https://stackoverflow.com/a/56569397/2642059 which strives to compute log2 at compile time like so: template constexpr enable_if_t log2 = 1 + log2; template <> constexpr int log2<1U>…
1
vote
2 answers

Angular 4 template variable focus

I have this cell template that shows the value of an Object into a span element, or, if the row is being editing, shows the value inside an input.
federhico
  • 75
  • 11
1
vote
2 answers

Call to constexpr function accepting an array fails to compile

Consider this code: #include template < int... Ints > constexpr std::array theIntArray = {Ints...}; template < size_t NN > constexpr void test(const std::array& xx) { theIntArray; } constexpr…
Vahagn
  • 4,670
  • 9
  • 43
  • 72
1
vote
1 answer

MODX Evolution. It is possible to get Template Variable ID in template?

I need to know which ID the Template Variable (TV) has, to put it into a form in the template. Something like this: Does MODX Evo have some special tag for it, which can be used in templates?
user4545171
1
vote
1 answer

Is it possible to get Children of children in a SilverStripe menu?

I'm putting together a 3 tier navigation menu in a SilverStripe 3.1 template, and have the following code in my template: <% loop $Menu(1) %> ... <% loop $Children %> ... <% loop $Children %>
  • $Model
  • <%…
    Highly Irregular
    • 38,000
    • 12
    • 52
    • 70
    0
    votes
    1 answer

    Accessing value of {{ts_nodash}} in airflow

    I need to access the value of {{ts_nodash}} to format it as a datetime and subtract an hour from it. But this gives me an error on dag saying: ValueError: time data '{{ ts_nodash }}' does not match format '%Y%m%dT%H%M%S' This is how my method looks…
    0
    votes
    0 answers

    Using Flask project variables in Processing sketch?

    I am creating a little project that has turned out to be less straightforward than I thought. I have my Flask project app.py, an html template called processor.html, and a processing sketch in the static folder called mySketch.pde. Processor.html…
    turo
    • 1
    • 3
    0
    votes
    0 answers

    Use template variable within a log query in Datadog

    In my LogStream widget I've the following log query host:"/aws-glue/app/r/jobs/job_name" the r letter should be variable based on the environment, thus I introduced a template variable…
    Smaillns
    • 2,540
    • 1
    • 28
    • 40
    0
    votes
    1 answer

    Deducing type of template value parameter

    I was wondering if the type of a value template parameter could be deduced or obmitted when writing something similar to this: enum class MyEnum {A, B} enum class MyOtherEnum {X, Y} template struct GenericStruct {}; When…
    Myon
    • 937
    • 13
    • 23
    0
    votes
    0 answers

    How to compare template variable in terraform [Datadog]

    I am creating a dashboard that has different types of widgets. I want to make this dashboard as customizable as possible using the template variables. For this reason, I have a template variable that stores the env value. In a service summary…
    0
    votes
    1 answer

    dynamic template variables values based on other template variables in influxdb - chronograf

    I have two template variables and I want that after selecting first template variable from dropdown, second template variable should be dynamic based on first variable value. let me clear this scenario with an example: assume I have this…
    0
    votes
    1 answer

    Django template variable not rendering

    So I am trying to render a django template variable, but for some reason it is not rendering out. I have the following code: Views.py ... def get_search(request, *args, **kwargs): context = {} context = {"test":"abcde"} return…
    0
    votes
    0 answers

    Lambda template variable (static constexpr) inside template class - unexpected expression of kind template_parm_index

    I'm trying to define a lambda template variable (static constexpr) inside of a template class. The template variable takes in a NTTP, which I want to be a size_t. I'm able to do so in certain situations, like if the NTTP is auto instead of size_t. …
    Sean
    • 393
    • 2
    • 11
    0
    votes
    0 answers

    Trying to understand variable templates and template aliases for proper usage

    I had previously asked these two questions: Auto Type Deduction Static & Non Static Member Functions My question pertains to the class provided in the first question which is my Signal class. The idea that I'm trying to convey within the class is…
    0
    votes
    1 answer

    Is this an elegant way to overload a static member function that provides the same interface as a non static member function?

    Consider the following non class template that has a template variable and uses template aliasing and auto type deduction. template using Type = T; using TypeA = Type; using TypeB = Type; class Foo { private: …
    Francis Cugler
    • 7,788
    • 2
    • 28
    • 59