MoritzLost Posted November 8, 2018 Share Posted November 8, 2018 UPDATE: I have published a stable version of this module! Discussion thread: Github: https://github.com/MoritzLost/TextformatterPageTitleLinks --- Hello there, I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution ? It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright ? You can download the module from Github:https://github.com/MoritzLost/TextformatterPageTitleLinks There's some more information in the readme as well. Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers. 2 Link to comment Share on other sites More sharing options...
mel47 Posted November 9, 2018 Share Posted November 9, 2018 Hi, I use a slightly modified version of http://modules.processwire.com/modules/textformatter-glossary/ to achieve this task. I'm not sure if it's exactly the same mechanism, though. I will eventually test yours and see if it suits my needs. Mel 1 1 Link to comment Share on other sites More sharing options...
MoritzLost Posted November 9, 2018 Author Share Posted November 9, 2018 12 hours ago, mel47 said: Hi, I use a slightly modified version of http://modules.processwire.com/modules/textformatter-glossary/ to achieve this task. I'm not sure if it's exactly the same mechanism, though. I will eventually test yours and see if it suits my needs. Mel Hm, I guess there was a module like that after all ^^ Well, the approach is different in that my module doesn't use delimiters to mark links-to-be. This is a bit less work, but gives you less control in exchange. Depends on the use case I think. Anyway, I'm working on improving my module and adding some features I find useful, so it will hopefully become a solid alternative to the glossary module ? Maybe I can even add an option to use delimiters as well, in case one needs more control ... 1 Link to comment Share on other sites More sharing options...
MoritzLost Posted November 18, 2018 Author Share Posted November 18, 2018 I have made some updates to the module, in case someone wants to check it out ? The module will now correctly exclude unpublished pages. There's also an additional check to make sure a page is viewable by the current user before it gets linked. Hidden pages are not included by default, but this can be changed through the module settings. I adjusted the option for including the current page; this option is now disabled by default. Also, this will now work inside Repeater or Repeater Matrix fields. The updated README file on Github reflects all changes. I still have a couple of things I want to add before I call it a stable release, but feel free to check out the current version and let me know if anything doesn't work! I'm not sure if the formatter will work with the ProDrafts module, as I don't own that module and I'm not sure how the draft and version statuses interact with the default statuses. If someone can test the module on a site using that module or shed some light on those questions (forum thread here), it'd be very much appreciated! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now