Forum Discussion

Inactive User's avatar
Inactive User
12 years ago

Text Editing for a Specific Category

Is it possible to edit text keys for a specific category only? If so, how? I know you can do it by page type and component; is there something similar?Thanks.

5 Replies

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    12 years ago

    I'm not sure if this is possible, but one way to check would be to use the "Show Text Keys" option in the Advanced tab under the Text Editor in Studio. Are you familiar with this functionality?

  • Inactive User's avatar
    Inactive User
    12 years ago

    Yes, I'm familiar with it but it doesn't help since currently, there doesn't seem to be any category specific ones. Can you think of another way around this problem if the functionality doesn't exist? 

     

    An example of our use case is that we want to call a blog article in one category a "story" in all the text keys and an "article" in the others.

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    12 years ago

    You can write a custom component and include it on the page where you want this information shown. In that custom component, you can either look up the name of your article via freemarker (or even through JS), and then use JS to change the name. Not ideal I know, but given your use case, it should have a fairly small overhead.

     

    The disadvantage here is that if someone has a slow connection (so the page loads slowly for them), they might notice the text switch. Also, is localization involved? That might add an extra layer to check for.

  • cblown's avatar
    cblown
    Boss
    12 years ago

    VenkS wrote: 

    The disadvantage here is that if someone has a slow connection (so the page loads slowly for them), they might notice the text switch. Also, is localization involved? That might add an extra layer to check for.

     

     

    We've worked around this issue by using CSS to hide the element in question on that specific page, then JS does its work you reveal the element. This way you won't see the text change on screen. The down side is that if JS is disabled the text doesn't appear at all, but without JS most pages fail to function anyway so its a safe enough bet.

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    12 years ago
    That sounds like a great plan, glad the idea worked out for you!