Different types of titles and using the option “keep permalinks”

Comments

8 comments

  • Avatar
    Nils Bier

    Hi Volker,

    Thanks for getting in touch.

    The mentioned issue is referring to an unexpected behavior when using Scroll Translations and publishing all languages.

    It would be great if you could share some further insights to question a) - Are you using Scroll Tranlsations at all, or is only Scroll Versions activated in that space? If also Scroll Translations is activated, did you publish a specific language, or all languages?

    In the meantime I'll check further details internally regarding your second questions.

    Best,
    Nils

    0
    Comment actions Permalink
  • Avatar
    Nils Bier

    Hi Volker,

    regarding your second requirement, you can access the following information (please note that this is not officially supported, as we do not have an official REST API, see https://k15t.jira.com/browse/VSN-1811):
    - Permalink (Confluence page title): $content.title
    - Scroll page title: $svThemeHelper.getScrollPage($content).scrollPageTitle
    - Scroll page title of original Language: $svThemeHelper.getScrollPage($content).originalPage.scrollPageTitle

    Unfortunately there's no way to get the page title of the translated page. The scrollPageTitle on a translated page always returns the page title of the currently selected language.

    I hope this information helps nevertheless.

    Best,
    Nils

    0
    Comment actions Permalink
  • Avatar
    Volker Weinreich

    Hi Nils,

    thank You, this helps very much! Especially the ScrollPage title. And, sorry, I have forgot to tell You the details. We are using Scroll Versions with Scroll Translations and HTML Exporter. In the moment we only publish in German, but we plan to publish in four languages. Technically we have established all four languages in the master space and the target spaces. So, at first I have published all languages and now I publish only in German until we start to translate the other languages.

    But besides from the languages I have expected by using the option "keep permalinks", that the permalinks from the pages of the master space overwrite the permalinks from the pages in the target space.

    Greetings,

    Volker

    0
    Comment actions Permalink
  • Avatar
    Volker Weinreich

    Hi Nils,

    I don't think, it is necessary to make up a new post.

    We are testing Con 6.13 with Scroll Version 3.14. As we are using macros with the scroll page title, we need methods to get the right title. The above code doesn't work anymore.

    - Permalink (Confluence page title): $content.title
    - Scroll page title: $svThemeHelper.getScrollPage($content).scrollPageTitle
    - Scroll page title of original Language: $svThemeHelper.getScrollPage($content).originalPage.scrollPageTitle

    Could you tell us the updated code, please. Thanks!

    Greetings

    Volker

    0
    Comment actions Permalink
  • Avatar
    Roman Serazhiev

    Hi Volker.

    Could you please share where do you use $content.title? a user macro? exporter template?

    $svThemeHelper has been removed a year ago when we removed the rest of the scroll versions theme. This change wasn't announced as it has never been an official API, and we didn't know that anyone was using it.

    Roman.

    0
    Comment actions Permalink
  • Avatar
    Volker Weinreich

    Hi Roman,

    thanks for your reply. I'm using it in a user macro - especially

    $svThemeHelper.getScrollPage($content).scrollPageTitle.

    Volker

    0
    Comment actions Permalink
  • Avatar
    Volker Weinreich (Edited )

    Hi Roman,

    this could be a workaround with $content.title. At the beginning I put this in the user macro:

    #set ($stralt = $content.getTitle())
    #set ($lenstralt = $stralt.length() - 12)
    #set ($strneu = $stralt.substring(1, $lenstralt))

    Our version numbers have always the same length, so I can cut the SV-parts and then using $strneu.

    But this is not a real solution, because it takes the permalink.

    Do you have other suggestions?

    Volker

    0
    Comment actions Permalink
  • Avatar
    K15t Team

    Hi Volker,

    unfortunately there is no equivalent workaround.

    The ScrollPageTitle of a page is stored in a page property called "com.k15t.scroll.versions.scroll-page-title". In Java it is possible to get it by calling

    ContentPropertyManager.getTextProperty(page, "com.k15t.scroll.versions.scroll-page-title").

    So a possible workaround would be to write a small app which injects this logic into the velocity context.

    Regards,
    Peter

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk