Viewing CSV data source assets

I'm trying to publish the records in a CVS data source to our website and want to:

  1. Put the contents of each record on a separate page



    So far I can list out selected fields for ALL the records in an asset listing through using the CSV data set keywords.



    But what I want to do is have the asset listing list the name of each record (in this case 'Publication name') and link through to a a separate page for that record displaying selected fields from the record.


  2. After that I want to change the layout of the separate pages by applying a paint layout.



    So, can these 2 things be done? I know that the CSV data records are shadow assets but I got advice that I might be able to link to separate pages for the records via their position number. how would I need to set up the asset listing and what keywords would I use to do that?



    Richard

Hi Richard,


The actual process of achieving this, as I see it, would be as follows:



Asset Structure:

    
    + CVS Data Source
       +-- shadow asset #1
       +-- shadow asset #2
       +-- shadow asset #3
    + Asset Listing (overall) [asset id #122]
    + Asset Listing (individual pages) [asset id #123]


[b]Asset Listing (overall)[/b]
Configure this to list out your shadow assets. This will act like a table of contents. Each item in the list links to the individual page asset listing passing the position number. Some example type format code would be:
    
    %asset_name%


[b]Asset Listing (individual pages)[/b]
Configure this so it lists 1 item per page. You can use the keywords in the type format of this asset listing to act like the content of the page using the custom keywords generated by the cvs datasource asset.

This relies on both asset listings having identical sorting, no position formats etc - so the asset position, and the result page numbers align correctly.

Hope this helps, let me know how you go.

Hi Anthony,


Thanks, this is working okay so far, however the links from the overall Asset Listing page to the individual pages, no matter which link I click on, they always go to the first position page.



I used this code:

    
    %ds__name_for_publication%

substituting %ds__name_for_publication% for %asset_name%


[quote]

This relies on both asset listings having identical sorting, no position formats etc - so the asset position, and the result page numbers align correctly.

[/quote]

I haven't made any changes to the asset sorting or posittion format screens.



Richard

[quote]
Thanks, this is working okay so far, however the links from the overall Asset Listing page to the individual pages, no matter which link I click on, they always go to the first position page.

[/quote]



Did you make sure that the asset listing is set to only display 1 asset per page?

Hi Nic,

[quote]

Did you make sure that the asset listing is set to only display 1 asset per page?

[/quote]



Yes, the asset listing for the individual pages lists one asset per page and the overall asset listing is set to the default 0.

I may need to take a look at this. I've setup an example in my test system and it functions ok. An asset listing would default to the first position if it didn't understand the query string: ?result_119831_result_page=%asset_position%

Also, on the overall asset listing, I'd like to list Word, PDF and Text file that were uploaded separately and to have them linked using %asset_short_name_linked%.


would this mess up the asset position correspondence between the overall asset listing and the individual page asset listing? The docs would be listed in a separate folder from the CSV data source record sets.



By the way, I didn't have this in the mix as a reason why the ?result_119831_result_page=%asset_position% query doesn't seem to be working properly.

Having those in the same listing would mess with the position number, but we could have the main listing that links off to the individual results also list word/pdf etc, but just not have them output any content. That should hopefully keep the numbering the same.

If anyone was wondering about this the issue was the keyword format.


Richards version was 3.18 and needed:

    119831_result_page=%asset_position%


3.20 systems require the format
    
    result_119831_result_page=%asset_position%

Very helpful thread, thanks. :slight_smile: