From 053154443eeb32dcc8b112e26c780aa152845010 Mon Sep 17 00:00:00 2001 From: Thomas Jakobi Date: Fri, 29 Dec 2023 16:44:46 +0100 Subject: [PATCH 1/2] Update named-anchor.md Add a reference to the AnchorsAway extra. --- en/building-sites/integrating-templates/named-anchor.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/en/building-sites/integrating-templates/named-anchor.md b/en/building-sites/integrating-templates/named-anchor.md index 8f8d938bd..306a0348e 100644 --- a/en/building-sites/integrating-templates/named-anchor.md +++ b/en/building-sites/integrating-templates/named-anchor.md @@ -32,7 +32,9 @@ 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 have to paste 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)). ``` php if($modx->resource->get('id') !=$modx->config['site_start']) { From 4b1624fbbc8c2c2bb243c99a406b55734bc02c62 Mon Sep 17 00:00:00 2001 From: Thomas Jakobi Date: Mon, 12 Feb 2024 17:35:50 +0100 Subject: [PATCH 2/2] Update text --- en/building-sites/integrating-templates/named-anchor.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/en/building-sites/integrating-templates/named-anchor.md b/en/building-sites/integrating-templates/named-anchor.md index 306a0348e..7715e8c4a 100644 --- a/en/building-sites/integrating-templates/named-anchor.md +++ b/en/building-sites/integrating-templates/named-anchor.md @@ -32,9 +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. -This can be achieved with the extra [AnchorsAway](https://extras.modx.com/package/anchorsaway) or with a custom plugin: - -For the custom plugin you have to paste 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']) {