8 years ago
Topic

Hello,

I’ve looked through the Forum but I didn’t find the answer.

I know how to make a link from an article page to the author's profile page and dynamically display in a module a list of articles of this author (created_by = id).

Also, I know how to display from a list of authors (user), the author’s profile page.

But Unfortunately, when I want to display dynamically only the articles of one author in a module, it doesn’t work. It display all articles from all the authors.

Something is wrong in my search form tab

Could you please help.

Regards,

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

you will need to explain your question in a bit more detail as the title of this topic and what you say in text are directly opposite:

"I know how to make a link from an article page to the author's profile page and dynamically display in a module a list of articles of this author (created_by = id)."

8 years ago
0
Level 2

Thank you for your answer

Sorry for not being clear enough.


I want the site visitors to be able to see a user's profile page with a list of articles he published. To access to the profile page of one user, the visitor click on the name of the user (author) in the article page (1) or from a list of users (2).

1 - link from an article:


I created a List and Search Type "author profile"

  • With (2) Under the search tab form:
  • Dynamic CCK "user"
  • User id> Variable> art_created_by
  • Under the Item tab

  • Some fields of the user
  • A module to display the list of Articles from that user.

  • I created a "List and Search" menu with the Search Type "" profile author. "


    Then I go in Form and Content Type "Article" and with the tab content in (2), I put a link on the "Article Created By" field. The link is List and Search (+ Search Type "author profile"> item "author profile" menu)


    For the 'author profile "module displays a list of articles:

  • I create another type of List and Search "articles by this user lists"
  • In (2) under the tab search form:

  • Live CCK value> Article
  • Article Created By> Variable> user_id
  • Under the Tab list

  • Article Title
  • Article introtext

  • Result: everything is displayed correctly



    2 - Link on the name of a user from a list of users (List and Search Type "Users"):


    I created another List and Search Type "author profile II"

    In (2) in the search form tab

  • Dynamic CCK "user"
  • User Name> Variable> id (Int)
  • Under the Item tab

  • Some fields of the User. The field "User Name" in (2) with the link list and search (+ Search Type "author profile II"> menu item "author profile II")
  • And a module to be able to display the list of article for that user.
  • I then created a "List and Search" menu with the Search Type "" author profile II. "


    Result: The profile is displayed correctly but the list of Articles displays all Articles of all authors and not only Articles by this author.


    Thank you for your patience and I hope I have been clearer this time.

    Best regards

    4229 Posts
    Kadministrator
    8 years ago
    2
    Level 1

    Your list of articles is filtered based on the URL value of "user_id" variable. In Search Type "author profile II" you won't get this variable in the url when you click on User name, you will have just id in the url. To fix this add "User id" field in the item tab (e.g. on hidden postion) and then click + on the link you have made on User name and enter in

    Custom Variables

    user_id=$cck->getValue('user_id')

    8 years ago
    1
    Level 2

    Hi Klas

    Thank you for your quick answer.

    You advice helps me to understand what was the trouble (I knew it was simple).

    There was no “User Id” field in the users list (list and Search type to display all users on the front-end).

    Then on “Profile Author II” (list and Search type) I’ve changed:

    In (2) in the search form tab

    User id> Variable> user-ID

    Merci encore,

    Cordialement

    131 Posts
    layonill
    5 years ago
    0
    Level 3

    hi, can you help me to solve this too?

    Get a Book for SEBLOD