Asset Parent Details

Hi,


Just wondering if there is a keyword that will display the name of the parent asset? I am trying to create a 'blog' with categories eg. Marketing, Media, Websites etc. Each category is a folder, with news items in each folder. Obviously, I need to display the name of the parent folder(s) to show which categories apply to each news item.



You may wonder why I just don't make 'Category' a metadata field and display & sort that way. Several reasons (1) breaking news items into separate folders reduces load times for asset listings. eg. searching 'Marketing' folder is quicker than searching everything, then sorting on metadata field. (2) To my knowledge, there is no way to get an Asset Listing to return only results matching a certain Metadata value. You can certainly sort on a metdata field, but not isolate certain values. You can with Javascript, but once again, load times are long.



Anyhow, there are many other instances where a 'parent name' keyword would be useful. Hoping there is one available…

Info about this here: http://forums.matrix.squiz.net/index.php?showtopic=6693


Short answer: there is no keyword.

Problem with a parent keyword is that an asset can have many parents. So, the keyword would not know what to print.


But, if you use an asset listing, and use asset grouping, you can group by the parent asset. Then, in the group formats bodycopy, you have keywords for the parent asset. :slight_smile:



Also, if you want to, you could use the Javascript API which has a getParents() function, which will return an array of all parents of an asset.

[quote]
Problem with a parent keyword is that an asset can have many parents. So, the keyword would not know what to print.



But, if you use an asset listing, and use asset grouping, you can group by the parent asset. Then, in the group formats bodycopy, you have keywords for the parent asset. :slight_smile:



Also, if you want to, you could use the Javascript API which has a getParents() function, which will return an array of all parents of an asset.

[/quote]



Thanks, I think. A few options there but nothing really that easy for what should be something quite simple.

[quote]
Thanks, I think. A few options there but nothing really that easy for what should be something quite simple.

[/quote]



It is extremely simple. Setting up an asset listing to group by parent should take about 1 minute. Seriously, it is cake.

[quote]
It is extremely simple. Setting up an asset listing to group by parent should take about 1 minute. Seriously, it is cake.

[/quote]



Yeah, I know how to sort an asset listing grouped by parent. To do that is quite simple. I'm talking more generally - I have always thought the parent name keyword would be of immense value. I am quite disappointed to learn now officially that it is not available. PS. Squiz used to have a keyword manual available with all the other manuals - this seems to have disappeared?

[quote]
Yeah, I know how to sort an asset listing grouped by parent. To do that is quite simple. I’m talking more generally - I have always thought the parent name keyword would be of immense value. I am quite disappointed to learn now officially that it is not available. PS. Squiz used to have a keyword manual available with all the other manuals - this seems to have disappeared?

[/quote]



But, a parent keyword really could only return a comma separated list of all parent ID’s since an asset could have 100 parents. But, like Greg pointed out, this was discussed in length in another post.



Check out the “Concepts” manual, this has most of the keywords you would be looking for: http://matrix.squiz.net/__data/assets/file/0008/48806/MySource-Matrix-Concepts-Manual_v3.24b.pdf

Nic, did you ever start work on this?

[quote]
Nic, did you ever start work on this?

[/quote]



Nope. Too busy working on the MySource Matrix Community and other free lance websites. :slight_smile: