Forum Discussion

dustin's avatar
dustin
Expert
10 years ago
Solved

How do I differentiate a text string by category/board?

In our knowledgebase area, we would like the "New Message" button to display "New Article".  The text key for this is...

menubar.button.new_message 

 

However, when this is changed, it also affects the forums area where we would like it to say "New Message".  

 

Is there a way to have this button change text based on the board?   If not, is there freemarker code I could use to create a custom button that behaves the same way?

 

  • dustin's avatar
    dustin
    10 years ago

    As Vishwajeet mentioned, the following does work...

     

     

    menubar.button.new_message  = New ${general.Message}

     

     

    However, if you do a search for the the text key general.Message, you'll see how the magic happens.  Using the @place extension you can specify strings based on location.

     

     

    menubar.button.new_message                        = New Post                         
    menubar.button.new_message@place:tkb       = Create New Document   

     

     

    Other location values include...

     

    @place:tkb     
    @place:board
    @place:blog   
    @place:idea     
    @place:qanda  //question
    @place:support
    @place:contest

     

    Note you can also use the @message extension for specific types of messages and string them with the @place extension

    Examples...

     

    general.Message@place:blog@message:root     = ${general.Message}
    general.Message@place:blog@message:reply    = ${general.Comment}

     

     

7 Replies

  • Hi dustin,

     

    As this is OOB components using same text-key. You can add a page specific script to change the title of the button as a work around.

     

    Regards,

    Mahesh Revanwar

    If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."

     
  • vishwajeet_hol's avatar
    vishwajeet_hol
    Expert
    10 years ago

    Hi dustin,

     

    Have u tried this...

    menubar.button.new_message  = New ${general.Message}

     

    Thanks,

    Vishwajeet

     

    Please give a Kudo or Accept as solution if my post helps you.:smileyhappy:

  • dustin's avatar
    dustin
    Expert
    10 years ago

    As Vishwajeet mentioned, the following does work...

     

     

    menubar.button.new_message  = New ${general.Message}

     

     

    However, if you do a search for the the text key general.Message, you'll see how the magic happens.  Using the @place extension you can specify strings based on location.

     

     

    menubar.button.new_message                        = New Post                         
    menubar.button.new_message@place:tkb       = Create New Document   

     

     

    Other location values include...

     

    @place:tkb     
    @place:board
    @place:blog   
    @place:idea     
    @place:qanda  //question
    @place:support
    @place:contest

     

    Note you can also use the @message extension for specific types of messages and string them with the @place extension

    Examples...

     

    general.Message@place:blog@message:root     = ${general.Message}
    general.Message@place:blog@message:reply    = ${general.Comment}

     

     

  • luk's avatar
    luk
    Boss
    10 years ago

    Besides the ones listed above, I know of the following (the above included for completeness):

    <string.key>@place:category
    <string.key>@place:tkb     
    <string.key>@place:board
    <string.key>@place:blog   
    <string.key>@place:idea     
    <string.key>@place:qanda  //question
    <string.key>@place:support
    <string.key>@place:contest
    <string.key>@place:review
    <string.key>@place:group
    <string.key>@place:media
    <string.key>@place:blog@message:root
    <string.key>@place:blog@message:reply
    <string.key>@page:<quilt.name>@component:<component.id>
    <string.key>@component:<component.id>
    <string.key>@device:mobile
    
    // and the ones I only hardly can make any sense of myself
    <string.key>@facebook
    <string.key>@user@list_tags
    <string.key>@user:other
    <string.key>@me@list_tags
    <string.key>@community@me@list_tags
    <string.key>@community@me@tag.description
    <string.key>@message@frequent@all_users.title
    <string.key>@author@frequent@scope@all_users@all_tags.title
    <string.key>@all_users@list_tags
    <string.key>@filter:smut
    <string.key>@messageScope:coreNode@userScope:mine
    <string.key>@messageScope:all@userScope:mine
    <string.key>@scope@user@list_tags
    <string.key>@scope@me@list_tags
    <string.key>@scope.title
    <string.key>@reason:notregistered
    <string.key>@reason:permissiondenied
    <string.key>@reason:sessionexpired
    <string.key>@message@frequent@scope@all_users@tag.title
    <string.key>@message@frequent@me.title
    <string.key>@message@frequent@scope@all_users@all_tags.title
    <string.key>@message.description

    For documentation that is available see:

    https://community.lithium.com/t5/FAQs-email-templates-and-text/About-text-keys/ta-p/109029

    https://community.lithium.com/t5/FAQs-email-templates-and-text/Set-the-scope-of-a-text-key/ta-p/109017

     

    For sure there are many more and many of them need proper documentation, would this maybe something for JohnD or SuzieH ?

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    10 years ago

    Hi luk

     

    The ones listed below actually aren't part of the same scoping feature. They are used internally. (Very confusing, I know.). The rest of the ones listed though do need to be added to the doc.


    luk wrote:

     

    // and the ones I only hardly can make any sense of myself
    <string.key>@facebook
    <string.key>@user@list_tags
    <string.key>@user:other
    <string.key>@me@list_tags
    <string.key>@community@me@list_tags
    <string.key>@community@me@tag.description
    <string.key>@message@frequent@all_users.title
    <string.key>@author@frequent@scope@all_users@all_tags.title
    <string.key>@all_users@list_tags
    <string.key>@filter:smut
    <string.key>@messageScope:coreNode@userScope:mine
    <string.key>@messageScope:all@userScope:mine
    <string.key>@scope@user@list_tags
    <string.key>@scope@me@list_tags
    <string.key>@scope.title
    <string.key>@reason:notregistered
    <string.key>@reason:permissiondenied
    <string.key>@reason:sessionexpired
    <string.key>@message@frequent@scope@all_users@tag.title
    <string.key>@message@frequent@me.title
    <string.key>@message@frequent@scope@all_users@all_tags.title
    <string.key>@message.description

     


     

  • luk's avatar
    luk
    Boss
    10 years ago
    SuzieH Thanks for the clarification! Did we miss any of the "valid" list?
  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    10 years ago

    luk it's going to be a day or two before i get a chance to go through it in enough detail to confirm. (Trying to get the documentaiton for 15.10 finished up.) Promise that I won't forget about this though.