auto glossary/dictionary? |
[eluser]michaelh99[/eluser]
I've searched but run into too many false hits. Does anyone have any suggestions for the most efficient way to implement glossary/dictionary link replacement for the final page output? I'd like to do db lookups based on final output and replace various words with links to a glossary that's maintained on my site.
[eluser]Aken[/eluser]
Perhaps a custom base controller (MY_Controller) and the _output() method would be of use to you?
[eluser]michaelh99[/eluser]
I think now that my question was pre-Flu (which I'm going through now) induced silliness. I have well-defined fields which I'd like to 'glossarize' so having an arbitrary hook or post controller call would be overkill. I just need to pass the text I'll be showing the user through the same sort of linkification type of function that I do now, only looking for words in the online glossary and replacing with anchor tags.
[eluser]Aken[/eluser]
Yeah it's more difficult to do on a whole-page basis instead of a chunk of specific content. You could include that functionality in a library, helper, or if you use some sort of template system (like Smarty or similar), you can create a plugin thought the template system ("modifier" as its known in Smarty lingo). That's what I did when I wanted to process some Markdown text. |
Welcome Guest, Not a member yet? Register Sign In |