T
T
twinkleofyourmind2022-04-18 12:49:43
MODX
twinkleofyourmind, 2022-04-18 12:49:43

How to call text inside heading into anchors using ModX modifier?

On my site, written on the ModX engine, there is a sidebar in the article template, in which there is a block with anchors leading to the headings in the correspondingly already open article. There are many such pages, so creating a bunch of templates for each of the articles is not advisable. It would be logical to use the ModX modifier to write code in one article template or chunk, where anchors will refer to headings with id (for example, from 1 to 5), in which the text will correspond to the called headings. How to implement it, what modifier is responsible for it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tarasov, 2022-04-18
@an-tar

How do you list links? The getResources, pdoResources, getImagesList(MIGX) snippets have the modifier in their composition, it is usually convenient to use, it tells the serial number and gives the desired "uniqueness". For example, like this:

<a href="#anchor_">anchor # </a>

Well, in the anchor, respectively, specify.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question