ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Searching and replacing in paragraph text.

December 21, 2011 10:55am

Subscribe [2]
  • #1 / Dec 21, 2011 10:55am

    JPDesignDev

    20 posts

    Hello all,

    I have a project in which a client would like to keep a glossary of definitions. I plan to implement a page that pulls all the glossary terms in alphabetical order. This should not be a problem. The one thing I would like to do with these glossary terms is give the client the ability to “select” a glossary term while writing a blog article. In other words, I need to provide the client a way to tell EE that these specific terms are in the article, and they need to be anchored with a jQuery pop over giving the full definition.

    I am trying to think of ways to tackle this, but I am still a bit inexperienced with EE.

    My initial thought was to create a ‘Glossary’ channel, and create entries within that channel. But I could not think of a way for the client to references those entries from within the editor while writing articles.

    My next thought, and last so far, is to use Low Variables to create the glossary of terms, and use NSM’s TinyMCE to reference those Low Variables.

    The latter seems to be the best option, but due to my inexperience, I am just not quite sure. There may be a much better way. My proposed solution may be way off base. Either way, I wanted to ask here because I thought someone would have tried something similar.

    All the best,
    Jarrod

  • #2 / Dec 23, 2011 9:08am

    Rob Allen

    3114 posts

    Are the linked glossary items inline or say in a list at the end of the document?

    If it’s the latter you could use the Playa addon - http://pixelandtonic.com/playa - to select any number of glossary entries and append them to the end of the document.

  • #3 / Dec 23, 2011 9:53am

    JPDesignDev

    20 posts

    I apologize for not being more clear. I would like to give the client the ability to add glossary terms inline with the article. In other words, anywhere within the TinyMCE, or whichever editor you choose, you could highlight the term “chemical reaction” from within the paragraph and somehow tell EE that this term has a glossary counterpart somewhere in the database, maybe a low variable.

  • #4 / Dec 23, 2011 10:40am

    Rob Allen

    3114 posts

    No need to apologise 😊

    That’s a bit of a stinker to work through but one of Low’s addons may work - http://gotolow.com/addons/low-link - or at least give you a starting point.

  • #5 / Dec 27, 2011 11:11am

    JPDesignDev

    20 posts

    Thank you. I will try this and report back on my findings.

  • #6 / Dec 30, 2011 12:37pm

    JPDesignDev

    20 posts

    I have successfully used Low Link to link a glossary item from the “Glossary” channel, but I have hit a roadblock. Does anyone know how I would go one step further, and pull in data from the “Definition” custom field for that particular glossary item.

    In other words:

    The tag output from Low Link for a term called “airspace” is as follows when I wrap it in double brackets [[airspace]].

    <a href="/glossary/airspace/" class="low_link word-82">airspace</a>

    But I need something like this:

    <a href="/glossary/airspace/" class="low_link word-82">airspace</a>
    <div class="tooltip">
         The definition for airspace goes here which is a custom field called "definition" in the channel "Glossary".
    </div>
  • #7 / Jan 03, 2012 8:20pm

    JPDesignDev

    20 posts

    I still can’t think of any way to accomplish this. Anyone?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases