Asset Listing data output


(Adam Fisher) #1

Hello again!
I'm trying to get an asset listing to output some JSON data, but sadly it insists on wrapping both the 'page contents' and 'default format' divs with <div> tags.

I'm after this:

    {'numberOfAssets': 2, 'assets': [
    {'assetId': 11073, 'assetName': 'name 1', 'assetType': 'Standard Page', 'position': '1'}
    , {'assetId': 11067, 'assetName': 'name 2', 'assetType': 'Standard Page', 'position': '2'}
    ]}

Obviously, I'm using the asset listing to go through a bunch of assets and output data about them.



Unfortunately, I'm getting this:

    
{'numberOfAssets': 2, 'assets': [
{'assetId': 11073, 'assetName': 'name 1', 'assetType': 'Standard Page', 'position': '1'}
, {'assetId': 11067, 'assetName': 'name 2', 'assetType': 'Standard Page', 'position': '2'}
]}

The div tags prevent me from parsing the JSON data properly - I'm not keen on the idea of then iterating through the DOM of the return data to strip out the text nodes, stick them together and then parse the resulting string…

Is there any way of suppressing the div tags?



Thanks


(Greg Sherwood) #2

Open the DIV properties and change the presentation from "Block level" to "Raw HTML". That will suppress the DIV tags.


(Adam Fisher) #3

[quote]Open the DIV properties and change the presentation from “Block level” to “Raw HTML”. That will suppress the DIV tags.
[right][post=“16267”]<{POST_SNAPBACK}>[/post][/right][/quote]

You’re a star, thanks.

I missed that option!