We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52646
    • 3 Posts
    Hello there. MODx new user.

    How do I show the category name on my blog?

    Manager


    Theme
      • 28432
      • 372 Posts
      If you mean that "Davultar Sevgi" is an article with ID 7 where you want to show is parent "Kategori" with ID 6 ?! You just have to display is parent like this
      [[*parent]]


      You can see all General Resource Fields and Settings Resource Fields here :
      https://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources [ed. note: Steeve last edited this post 10 years, 2 months ago.]
        • 52646
        • 3 Posts
        Quote from: Steeve at Aug 15, 2016, 02:20 PM
        If you mean that "Davultar Sevgi" is an article with ID 7 where you want to show is parent "Kategori" with ID 6 ?! You just have to display is parent like this
        [[*parent]]


        You can see all General Resource Fields and Settings Resource Fields here :
        https://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources

        Thank you.
        However, given that the category showed tray with the label. How do I show the category name?
          • 28432
          • 372 Posts
          Quote from: prototurk at Aug 17, 2016, 02:52 AM
          Thank you.
          However, given that the category showed tray with the label. How do I show the category name?
          You're welcome!
          Now you have the ID of the parent, so you can make a call with getResourceField EXTRA like this :
          [[getResourceField? &id=`[[*parent]]` &field=`menutitle`]]

          This will show menutitle field but you can choose any field you want to show like longtitle or pagetitle for example.
            • 52646
            • 3 Posts
            Quote from: Steeve at Aug 17, 2016, 03:00 AM
            Quote from: prototurk at Aug 17, 2016, 02:52 AM
            Thank you.
            However, given that the category showed tray with the label. How do I show the category name?
            You're welcome!
            Now you have the ID of the parent, so you can make a call with getResourceField EXTRA like this :
            [[getResourceField? &id=`[[*parent]]` &field=`menutitle`]]

            This will show menutitle field but you can choose any field you want to show like longtitle or pagetitle for example.

            Super. Thank you so much.

            However, he did not seem at home. sad
              • 28432
              • 372 Posts
              Quote from: prototurk at Aug 17, 2016, 04:22 AM
              Super. Thank you so much.
              However, he did not seem at home. sad

              If you are in "Davultar..." page, the parent (category) it's "Kategori" ? So it will show "Kategori" normally.
              You would like to display the ultimate parent "Home" ?