Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a reference to the AnchorsAway extra #484

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion en/building-sites/integrating-templates/named-anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To generate a link to a Resource with ID 12, while using a named anchor of "proh

Alternatively, you could use a plugin to automatically prepend a link to the current resource before the actual anchor.

Put the following code into a new plugin, and on the System Events tab assign it to the "OnWebPagePrerender" event (based on [this post](http://forums.modx.com/thread/35800/plugin-anchorsaway?page=3#dis-post-199475)).
This can be achieved with the extra [AnchorsAway](https://extras.modx.com/package/anchorsaway) or with a custom plugin. For the custom plugin, you need to insert the following code into a new plugin and assign it to the "OnWebPagePrerender" event on the "System Events" tab. (based on [this post](http://forums.modx.com/thread/35800/plugin-anchorsaway?page=3#dis-post-199475)).

``` php
if($modx->resource->get('id') !=$modx->config['site_start']) {
Expand Down
Loading