♻️ A page shouldn't link to itself
JackDevAU opened this issue · 1 comments
JackDevAU commented
cc @theixdev, @pierssinclairssw, @bradystroud
Hi All,
As mentioned by @tiagov8 here - #731 we shouldn't be linking to the same page when using this Widget on SSW.Rules. As per the rule https://www.ssw.com.au/rules/do-you-avoid-linking-a-page-to-itself
To keep this plugin still generic, implement the following
- Investigate the best option
- Implement
More Information
Due to there not being access to window
when building statically.
Options 1.
- Pass the Widget an option that can enable/disable linking globally (i.e.
linkToSSW
: default = true)
Option 2.
- Pass the page location to the Widget and only link when not on ssw.com.au/rules
bradystroud commented
As per my conversation with @JackDevAU and @jaydenalchin
Option 3.
- Make the link go to the all rules page https://ssw.com.au/rules/all-rules
- The all rules page is more relevant as it contains similar information.
- Once SSWConsulting/SSW.Rules#711 (comment) is complete, the link can be updated to include the correct filters in the query string so the page will show the exact same data as the widget.
- Remove the widget from the all rules page, as it shows the exact same data