Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 11:57
    ds
    0

    What should I set as TitlePropertyAlias, because at the moment navigation displays nothing? Could you provide an example?

  • dimi309 245 posts 579 karma points
    Aug 29, 2011 @ 12:21
    dimi309
    0

    Hello!

    As is mentioned in the documentation , TitlePropertyAlias is the alias of a property that should be entered in each of your main document types (or in a parent document type from which they all inherrit) and in your translation document types. This will serve as the title or "name" of each page, so that it can be translated in all menus.

    For example if you have a document type named "FreeFormPage" you could add a textstring property to it and give it the alias "title". You should also add a property with the same alias and type to FreeFormPage_Translation.

    You can then create a page of type FreeFormPage and for example place the name "Home Page" in the "title" field in English in the main page and "Page d'Accueil" in the French translation. When adding the navigation macro to the page's template, you would set TitlePropertyAlias="title". This way, when the visitors to your site choose to see content in English, they will see a link labelled "Home Page" in the navigation and when they choose French they will see a link labelled "Page d'Accueil".

    I hope that this helps!

  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 21:40
    ds
    1

    Hi Dimitri!

    Thanks for the feedback. I could manage to set links but I have two questions more.

    As you mentioned like in the following, the first language declared assumed to be the default one but this is not the case for me.

    "The first language on the list is not checked on the translation creation form. This is because the first language declared in the Settings section is assumed to be the default one."

    So if you declared english and greek in the settings, the web site first should display greek as default language. How could I achieve it?

    Secondly, some of my pages uses usercontrol files. Even though I placed PropertyTranslation macro into the template which needs to be translated, the user control file is not displayed.

  • dimi309 245 posts 579 karma points
    Aug 29, 2011 @ 22:40
    dimi309
    0

    Hello ds!

    If your default language is not the first one on the list, you can specify it with a key in your app settings. For example for having French as a default language you would add this:

    <add key="uPolyglotDefaultLanguage" value="fr" />

    Apologies for not having mentioned this in the documentation.

    About your second question I am afraid I did not understand exactly what you tried to do. Would you mind pasting the part of your template which you are referring to here so that I can be sure?

    Cheers

    Dimitri

     

  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 22:48
    ds
    0

    Would you mind contacting you via skype if it is OK for you cause it would be easier to tell my problem, I think

  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 22:59
    ds
    0

    In both cases, you could find the portion of the code for my second question about usercontrol, dimitri.

    <asp:content contentplaceholderid="cp_content" runat="server">
    <div id="leftcontent">
        <div id="page-bgtop">
          <div id="content">
            <div class="post">
              <h2 class="title"><span><umbraco:item runat="server" field="pageName"></umbraco:item></span></h2>          
               <div class="entry">
                  <!--<umbraco:Item field="bodyText" runat="server"></umbraco:Item>-->
                  <umbraco:Macro Property="bodyText" Alias="PropertyTranslation" runat="server"></umbraco:Macro>
               </div>
            </div>
          </div>
        </div>
    </div
    </asp:content>



  • dimi309 245 posts 579 karma points
    Aug 29, 2011 @ 22:59
    dimi309
    0

    How about IRC? I have connected to eu.undernet.org and have started a room called polyglot . I'll be around for a while if you would like to discuss this.

  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 23:17
    ds
    0

    I am not good at IRC, dimitri but I would be grateful to help me fix that issue by checking code snippet above

  • dimi309 245 posts 579 karma points
    Aug 29, 2011 @ 23:18
    dimi309
    0

    I think I have understood now. Have you created a user control and associated it with a macro which you have inserted into the bodyText field using the rich text editor?

  • ds 191 posts 223 karma points
    Aug 29, 2011 @ 23:19
    ds
    0

    That is right, dimitri :)

  • dimi309 245 posts 579 karma points
    Aug 29, 2011 @ 23:32
    dimi309
    0

    Oops :( ... I am really sorry to disappoint you but this is one scenario which I have not managed to get working. As far as I have been able to find out, at least in the current version of Umbraco, you cannot call a macro within a macro. So, since PropertyTranslation is an umbraco:macro tag, as opposed to umbraco:Item, macros, like for example the ones associated with your user controls, will not show up when inserted in the rich text editor...

    In my case, this has not been an issue since I place user control macros directly into the templates and use umbraco dictionary items within the user controls to provide multilingual labels (if you do this please see "Setting the Culture" in the documentation), but I don't know if this is something you would consider doing.

     

     

  • ds 191 posts 223 karma points
    Aug 30, 2011 @ 00:00
    ds
    0

    OK then I copied textpage template and renamed it as textpageSub, use textpageSub only for that page which has macro associated with usercontrol.

  • dimi309 245 posts 579 karma points
    Aug 30, 2011 @ 09:44
    dimi309
    0

    Great! I'm glad you have found a solution. I always have this issue in mind in any case. If in a subsequent version of Umbraco macros can be added inside macros or if I come up with some other way to support such a thing I will add the feature to a later version of the package.

     

Please Sign in or register to post replies

Write your reply to:

Draft