7 years ago
Topic

I want to display list of articles by the author of those articles. 

I was thinking about Search Type and filter by "created by" but then I realise there is no way to identify who is logged in.

Can someone guide or advice the best way to achieve this.

Thank you

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
4
Level 1

You are on the right path. Just add live value User->id to your search type on the "created by" field.

7 years ago
3
Level 2

Are we talking in SEBLOD Search Form or in Menu SEBLOD  Search Item  and Live Value update are? (this must be a silly question as I feel like its the same) can you please confirm.

4229 Posts
Kadministrator
7 years ago
2
Level 3

7 years ago
1
Level 4

I tried all the steps as per the tutorial but I still can see all the articles which belongs to that category listed. But what I want is to display only articles submitted by that user. 

I enabled the debug to show you the sql query as well. 

SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS parent,t0.author_id AS author,t0.cck AS cck,t0.storage_location AS loc,tt.id AS type_id,tt.alias AS type_alias
FROM `#__cck_core` AS t0
LEFT JOIN `#__content` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t1.state = 1
AND t1.access IN (1,1,2)
AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2016-11-22 23:41' )
AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2016-11-22 23:41' )
AND t0.cck = 'buyability_network'
ORDER BY t1.title ASC
LIMIT 25

0.022 seconds (0.022); 16.91 MB (16.908) - afterSearch [Cache=OFF] = 6 results.

These are the steps I followed but looks like the Created by doesnt really filter by user. 

1. Created Search Type with List template and correct Content Type

2. add Created by and set user (2) as the live. but did not change anything in Configure

3. Add the title as form assuming this will pull all the data in each fields (but when i click each title it takes to the form with no data in it).

4. Created the menu item and logged in as specific user but i see all the articles listed which i shouldnt :(

Can you please tell me where i went wrong with that tutorial. 

Thanks. 

4229 Posts
Kadministrator
7 years ago
0
Level 5

"set user (2) as the live"

you need to set live value to User, then click on + and add "id" as property that will get used. It is described in the tutorial.

7 years ago
0
Level 1

With the excellent support by BUCKLASH. i manage to get the items listed by each user. Now the issue is I dont see the data when I click the title of the item.

Any Idea why is that?

7 years ago
0
Level 1

This is what im talking about in this thread. 

We always have to set the Content type in Form otherwise it will not display the list of articles. Does that mean our Forms are not designed properly according to Octopoos "Don't do that, let SEBLOD choose. The good form will be choose automatically."

Also even when I set the permission to create articles and edit their own articles the form which comes is new form not the form with current data.

https://www.seblod.com/community/forums/general-discussions/link-to-editing-content#post50047

Get a Book for SEBLOD