Using keyword conditions to display results in Site Map report


(Paul Duffield) #1

Hi Squiz,

I am in the process of creating Site Map assets that I will provide to our client to assist them to review the content of particular areas of our websites.

Using keywords I am displaying information about each asset, such as asset id and name, last updated, asset status.

One thing I am also trying to show is if an asset is linked elsewhere in the site, as this would be very helpful to them. Currently I am trying to use conditional statements to achieve this.

I have the following code in the display format field of the site map, for each particular asset type that I wish to display.
The bolded code is what I am currently using to try and display linked details (where a page is linked somewhere else in the site); the idea being that if linked info exists then it will display based on the begin condition statement. However, in each case (even when a page is linked) I am getting No as the result.

%asset_name% (ID: %asset_assetid%)
  Last updated: %asset_updated^date_format:d M Y% - %asset_status_description%
  %asset_url%
Linked:%begin_asset_linking_info%%asset_linking_info%%else_asset%No%end_asset%

Any thoughts on where I might be going wrong?


(Bart Banda) #2

What does %asset_linking_info% print by itself?

I tried it in the latest version of matrix and it works, what version are you using? The keyword was added in 5.2.4.0.

By the way, you will find that when that condition works, it will always print the begin_ content because every asset should have at least something in the %asset_linking_info% keyword, so you will most likely never have a “No” version.


(Paul Duffield) #3

Thanks for your reply Bart.

This makes more sense now. We have version 5.1.9 , hence why %asset_linking_info% is not returning anything. I had included conditions to try and get the keyword to do something.

I believe we are upgrading shortly to newer version, so I will hold off including the asset linking info until the new version is in place.

Thanks again guru man!

Cheers
Paul.