Skip to content

Instantly share code, notes, and snippets.

@Security2431
Last active May 28, 2018 11:20
Show Gist options
  • Save Security2431/ad5886bb6a63116522f008bdecf005be to your computer and use it in GitHub Desktop.
Save Security2431/ad5886bb6a63116522f008bdecf005be to your computer and use it in GitHub Desktop.
modx feature
1. anchor scroll
`<a href="[[~[[*id]]]]#anchor[[+idx]]" class="sv-list__link" data-scroll-to>[[+city]]</a>`
`[[~[[*id]]]]` - link of current page;
`[[+idx]]` - order, starting with 1;
2. anchor links `[[!++site_url]]category/[[*alias]]/#review`
useful resources:
https://modxdevpro.ru/blog/revo/documentation/120-parameters-migx-getimagelist
https://docs.modx.com/extras/revo/migx/migx.frontend-usage
3. logo home page
```
[[*id:eq=`[[++site_start]]`:then=`
<div class="header__logo hd-logo"><div class="hd-logo__link"><img class="hd-logo__img" src="[[!++site_url]]assets/templates/default/images/new-logo.png" alt="Кристалл Сервис"><span class="hd-logo__text">Кристалл Сервис</span></div></div>
`:else=`
<div class="header__logo hd-logo"><a class="hd-logo__link" href="/"><img class="hd-logo__img" src="[[!++site_url]]assets/templates/default/images/new-logo.png" alt="Кристалл Сервис"><span class="hd-logo__text">Кристалл Сервис</span></a></div>
`]]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment