in in you need to insert the price immediately after the text , but not everything is so simple. To somehow explain what I need, here is the following pseudoc"> in in you need to insert the price immediately after the text , but not everything is so simple. To somehow explain what I need, here is the following pseudoc" />
A
A
Archer *range attack +10*2017-03-01 03:53:09
MODX
Archer *range attack +10*, 2017-03-01 03:53:09

What should the condition look like in MODX for this?

In the chunk in in you need to insert the price immediately after the text , but not everything is so simple. To somehow explain what I need, here is the following pseudocode:<head><title>

if (tpl==12) {
  "Ремонт за  руб."
}
elseif (tpl==22) {
  "Ремонт от  руб." // а тут нужно поле первого дочернего элемента
}
else {
  " " // пустая строка
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DarWiM, 2017-03-09
@kon-rafikov

All the suggested options are good, but I would advise you to use the Fenom template engine , which is in the pdoTools component .
As a result, right in the chunk, you can place something like this:

{var $example_title = $pagetitle}

{if $_modx->resource.template == 12}
    {var $example_title .= " Ремонт за {$a4yProblemPrice} руб."}
{elseif $_modx->resource.template == 22}
    {var $example_title .= " Ремонт от {$menuindex} руб."}
{/if}

<title>{$example_title}</title>

I
Ivan, 2017-03-01
@LiguidCool

The repository seemed to have an 'if' plugin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question