Hi everyone,
Any help would be appreciated:
I have an asset listing that points at a standard page, looks at all the standard pages/folders below that page and prints their children all on the first std page. Including contents of the parent page.
In the following way:
<h1>STD Page</h1>
<h2>Page 1</h2>
<p>Page 1 content %parent_contents%</p>
<ul> list of documents under Page1</ul>
<h2>Page 2</h2>
<p>Page 2 content %parent_contents%</p>
<ul> list of documents under Page2</ul>
etc…
However, in cases where the second tier pages have no children, I can't get that parent content to print on the page. Any ideas?
Try nesting two Asset Listings together. The second Asset Listing should be nested in the Default Format of the first.
For the rootnode of the second Asset Listing use a dynamic rootnode. Use a session variable named list_current_asset_id.
http://forums.matrix.squiz.net/index.php?showtopic=5971&st=15
[quote]For the rootnode of the second Asset Listing use a dynamic rootnode. Use a session variable named list_current_asset_id.
http://forums.matrix.squiz.net/index.php?showtopic=5971&st=15[/quote]
Thank you guys,
First asset listings prints contents of all the children on one page…good!
Second asset listing - to print asset names of all children under the corresponding pages printed on first asset list.
I select a root node on Second asset list (the site where documents are) + Under Dynamic Parameters - put in the keyword
list_current_asset_id
With this I just get the first child page contents print…and no children and no other - pages. I remove that (and use ASSET ID) and it prints all child pages…with their children (which is what i want) but children of all pages print under each page contents…not just the immediate children.
[quote]Thank you guys,
First asset listings prints contents of all the children on one page…good!
Second asset listing - to print asset names of all children under the corresponding pages printed on first asset list.
I select a root node on Second asset list (the site where documents are) + Under Dynamic Parameters - put in the keyword
list_current_asset_id
With this I just get the first child page contents print…and no children and no other - pages. I remove that (and use ASSET ID) and it prints all child pages…with their children (which is what i want) but children of all pages print under each page contents…not just the immediate children.[/quote]
Just to confirm -> You did nest the second asset listing in the typeformat of the first?
The Root Node of the second should be set to a location in the hierarchy where all possible dynamic replacement root nodes fall under as it sets the scope of where the dynamic root node can be located. The "Replacement Root node for the listing" should be a session variable called list_current_asset_id. Also make sure you have direct links turned on.
We use this approach quite often…
[quote]Just to confirm -> You did nest the second asset listing in the typeformat of the first?
The Root Node of the second should be set to a location in the hierarchy where all possible dynamic replacement root nodes fall under as it sets the scope of where the dynamic root node can be located. The "Replacement Root node for the listing" should be a session variable called list_current_asset_id. Also make sure you have direct links turned on.
We use this approach quite often…[/quote]
Thank you Curdin, I did as you said.
The second asset listing is nested in the default format of the first. Root node is at the top of all possible areas where this listing is applied.
SESSION Variable Name = list_current_asset_id
When I preview: I get the listing of all the top pages (as it should) but instead of printing their children underneath each listed page - it prints the children of the static root node…for each page on the 1st asset list. See image of example…
alist.jpg (17.9 KB)
What version of Matrix are you on?
3.16
list_current_asset_id was not added to Matrix until I think 3.18.6, but I know it was the 3.18 branch. So, this is the reason why this would not be working for you. :(
Ah, that makes sense, thanks! i'll go with Plan B…