$THIS...const is useful when it is necessary to refer to the current item, for example when creating dynamic links that should be unique for each collectible item.
anchortag, turning the image itself into a link that when clicked upon takes the user to a new webpage that shows a Single Collectible. Creating a Single Collectible is also fairly easy, but the question is- how would you pass the data about WHICH collectible you want to display on the Single Collectible page?
singleNFT.htmlpage. You could manually pass the details
assetTokenId=1234but then you would be stuck always rendering this one token. Instead, because we are inside the
asset containerfrom line 6-9 which gets rendered for each Collectible returned, we can access THIS specific token. If we use $THIS_TokenID in the
hreflink, it will get replaced with the token currently displayed, for example '1234'. If we do the same for the
assetContractAddresswe can now link to the
singleNFT.htmlpage passing all the information required for that page to render dynamically the specific collectible token we are interested in.
$THIS...const is useful for more than just creating dynamic links- it can also be used to create dynamic forms. This means you can combine the Collectible feature with other features like smart contracts- allowing users to interact with smart contracts using the about the current token they are looking for. A great example for this would be to create a Collectible store front connected to a smart contract to let people buy or sell Collectibles directly from your website!