# Collection Display

The [NFTCollectionDisplay view](https://github.com/onflow/flow-nft/blob/461524168b50d015fffec23f33bba5adabdbe791/contracts/MetadataViews.cdc#L558C34-L558C34) tells platforms how to show a Collection. Flowty relies on the following fields from this view:

* **Name:** What is this collection's name? In the absence of this view, we will use a collection's Contract name.
* **Description (Optional):** A brief description of your collection.
* **External URL (Optional):** A backlink to your collection's native website/app for users to discover more about your collection.
* **Square Image:** The image to use for your collection's thumbnail.
* **Banner Image:** The image to use as the background for your collection banner on Flowty's collection page. [**Recommended Dimensions are 1200x630**](https://github.com/onflow/flow-nft/blob/4c0c684baed98e2ffd7a8f9d27973c1db5dd1239/contracts/MetadataViews.cdc#L571).
* **Socials:** A set of social pages for your collection. Currently Flowty only supports Twitter links. Give us a shout if you want to see others added!

<figure><img src="https://1110140566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYhIgoCq3USH1in8LHiq2%2Fuploads%2FjxXZA7EAm0T1RxUmYXnp%2FCollectionDisplay.png?alt=media&#x26;token=d864f625-b608-4e4c-a35a-9897c5fabc2a" alt=""><figcaption><p>Collection display example (<a href="https://www.flowty.io/collection/0xc934ed0c0f4788bc/Avataaars">Avataaars collection page on Flowty</a>)</p></figcaption></figure>

{% tabs %}
{% tab title="Sample" %}

```
pub contract Avataaars: NonFungibleToken, ViewResolver {
    // ...
    
    pub resource NFT: NonFungibleToken.INFT, MetadataViews.ResolverCollection {
        pub fun resolveView(_ view: Type): AnyStruct? {
            switch view {
                // ...
                case Type<MetadataViews.NFTCollectionDisplay>():
                    return Avataaars.resolveView(view)
                // ...
            }
            return nil
        }
    }

    pub fun resolveView(_ view: Type): AnyStruct? {
        switch view {
            // ...
            case Type<MetadataViews.NFTCollectionDisplay>():
                return MetadataViews.NFTCollectionDisplay(
                        name: "Flowty Avataaars",
                        description: "This collection is used showcase the various things you can do with metadata standards on Flowty",
                        externalURL: MetadataViews.ExternalURL("https://flowty.io/"),
                        squareImage: MetadataViews.Media(
                            file: MetadataViews.HTTPFile(
                                url: self.imageBaseURL.concat("1")
                            ),
                            mediaType: "image/jpeg"
                        ),
                        bannerImage: MetadataViews.Media(
                            file: MetadataViews.HTTPFile(
                                url: "https://storage.googleapis.com/flowty-images/flowty-banner.jpeg"
                            ),
                            mediaType: "image/jpeg"
                        ),
                        socials: {
                            "twitter": MetadataViews.ExternalURL("https://twitter.com/flowty_io")
                        }
                    )
        }
        return nil
    }
}

```

{% endtab %}

{% tab title="Definition" %}

```
/// View to expose the information needed to showcase this NFT's
/// collection. This can be used by applications to give an overview and
/// graphics of the NFT collection this NFT belongs to.
///
pub struct NFTCollectionDisplay {
    // Name that should be used when displaying this NFT collection.
    pub let name: String

    // Description that should be used to give an overview of this collection.
    pub let description: String

    // External link to a URL to view more information about this collection.
    pub let externalURL: ExternalURL

    // Square-sized image to represent this collection.
    pub let squareImage: Media

    // Banner-sized image for this collection, recommended to have a size near 1200x630.
    pub let bannerImage: Media

    // Social links to reach this collection's social homepages.
    // Possible keys may be "instagram", "twitter", "discord", etc.
    pub let socials: {String: ExternalURL}

    // init truncated...
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowty.io/developer-docs/nft-metadata-standard/collection-metadata/collection-display.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
