We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51033
    • 6 Posts
    Hi

    I have searched but not found, so please excuse if this question has been answered ...

    Basically what I would like is have a page with all the articles by one author - which is done by articles automatically, generating the furl /author/XYZ. What I am missing though is to show not just the articles by that person but also further information, eg a biography, photo etc.

    Since I couldn't find how articles composes these pages and thus modify it I tried using getresources, but with no luck unfortunately. Sometimes it doesn't work at all, sometimes the count shows there are 40 entries, sometimes only 4; then it shows one article by XYZ although there are six and so on. This call for example shows me one entry (content and count) where there should be six.

    [[getResources?
    &parents=`3`
    &tpl=`sample.ArticleRowTpl`
    &includeTVs=`1`
    &includeContent=`1`
    &showHidden=`1`
    &tvPrefix=``
    &limit=`100`
    &includeTVList=`article_author`
    &prepareTVList=`article_author`
    &processTVList=`article_author`
    &processTVs=`1`
    &cache=`0`
    &tvFilters=`article_author==%James%`
    ]]
    [[+total]]

    Maybe I should start from scratch: How can I display a page including the biography (content from tv article_author) and a list of articles by that author (either taken from article_author or createdby)?

    Thanks in advance
      • 36818
      • 119 Posts
      Hi,

      not sure if I understand your issue correctly, but isn't the TV for the author in an article (made by the extra Articles)
      [[*BlogAutor]]
      ?

        • 51033
        • 6 Posts
        Hi achterbahn,

        thanks for answering ... Accessing the author value is not my issue, I get it by createdby as well as by an additional tv I need for more info (bio, pic etc.). What I need is a page that shows this info as well as all articles created by that person. This call

        <a href="[[~[[*parent]]]]author/[[*createdby:userinfo=`username`]]">Read more from [[*createdby:userinfo=`username`]] ></a>

        is the on-board articles call and creates a page /author/[username] with all his/her articles, but I need to have additional info on this page shown as well: pic and bio.
        • Smartmm,

          Ok so I have a hack for that every thing. It may sound strange but I recently did this for a project we are working and it worked great. SimpleSearch. ( Modx Plugin). This search can be used to do a lot of things including filter search results. So what you need to do is.

          1. Install Simple Search
          2. Create a Search Result Page, that pulls author information in the template.
          3. Assuming all your Authors are also users, at least as far as MODX is concerned. Access the users and create extend fields, for the additional information. If you have a lot of users adding each extend field and information can get annoying. What I did was create a login page for our authors, and then a profile update form. This way the authors do the work and not you. (including the extent fields.)
          4. now you modify the links in the chucks for your articles to be simple search forms. Uses hidden fields and placeholders the front end user will not see the difference.
          5. This way when the user is on the search results page, they see all the information you want them to see dynamically. be sure to use the username placeholder as part of your calls on the search results page.


          This works because both the search and the username are the same. Thus this hack will dynamically create an authors page that is well more robust. Don't forget about the Search Results Container, it will help with the template.

          https://rtfm.modx.com/extras/revo/simplesearch
          https://rtfm.modx.com/extras/revo/login/login.updateprofile

          That should solve the problem.