Forum Discussion

clemlith's avatar
clemlith
Expert
11 years ago

Changing the community name only for one category

Hi Everyone,

I want to customize the comunity name only for a one category.

Page title are usually structured like this :

page.head.title = {0} {1} {2}

where 0 is the prefix, 1 the current's page name and 2 the community name.

 

I want to customize the title of my category as below :

{0} {1} {custom community name}

 

I found this TKB article but can't find the proper line of code that can achieve what I want.

Do you have an idea about this ?

 

Clement

  • Unless I'm wildly confused clemlith , that customisation as described only works for the front page.
    IE You can tell the frontpage to display the title of your choice, but the structure will appear on boards, topics etc using the normal format.

     

    I've personally never encountered anything that would let me change the title tag for the page, but then again I never really looked before now.

     

    I know you can specify text keys to target specific areas like that article describes

    IE page.head.title@page:CommunityPage

    And there are options for @device @place etc 

    It may be possible to target them via @category or @boardid but I'm not sure of the structure(or if it does allow it)

     

    page.head.title@category:YourCategory = "New Title"
    
    page.head.title@id:YourBoardID= "New Title"
    
    

     Neither of those works.

     

    You can read about scoping keys here: http://community.lithium.com/t5/FAQs-email-templates-and-text/Scope-a-text-key-to-a-page-or-component/ta-p/109017

     

    But we'll need someone from Lithium support to jump in and confirm the different @scope a text key can have....

     

    Otherwise you can always control the page title on a custom page with a text key. Maybe there's the option to recreate your board page that way?

    • clemlith's avatar
      clemlith
      Expert

      Hi Tim_h ,

      Thanks for your suggestions.

      I think using a custom page to recreate my board will too time consuming for me as I have in reality 3 boards and a category where I need to customize their title.

      I guess I will poke the support on this.

      Best regards,

      Clement

       

       

      • Tim_h's avatar
        Tim_h
        Boss
        Keep us posted, I think being able to alter text keys at the node level could be a great way to foster those mini communities within our larger ones.
  • AdamN's avatar
    AdamN
    Khoros Oracle

    As already mentioned, there's unfortunately not going to be a good way to scope the text keys themselves unless you have custom pages for all the relevant pages.

     

    The only other option that comes to mind is using JavaScript to set the document.title variable after the page loads. The thing to keep in mind with this approach is that while it may change the title in the end-user's browser, it will likely not be picked up by search crawlers. So it will have little to no impact on what is indexed and appears in search engines.

    • clemlith's avatar
      clemlith
      Expert

      Hi AdamN ,

      Indeed it was for a SEO purpose.

       

      I've filed a support case and NoamanA is trying to find a way to achieve this customization.

      As for now we have explored the option of creating a custom page and then override the default page with it in order to be able to create a custom text keys.

       

      Best,

      Clement

       

  • NoamanA's avatar
    NoamanA
    Lithium Alumni (Retired)

    Hey All

     

    Just to close the loop on this, we determined that unfortunately this isn't possible for custom quilts.  To quote DougS from a previous post:

     

    ...if you are on a standard page, that just happens to be overridden by a custom quilt (which is what I'm guessing you are doing here), it is stil going to use the standard page name.

     

    Regards

    Noaman