Helpcenter +918010117117 https://help.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" [email protected] https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India

ms.collections

This widget is used to render all collections (or single collection) from an entity.


Attributes

page_sizeThis attribute is used to define the page size i.e number of records that you want to show on a single page.
sortfieldsThis is attribute is used to sort the records on the basis of any field. Example: ms-data-sortfields='name'
resolveThis attribute is used to resolve the data from a particular entity from the field whose typeof is select.

Variables

collections
Returns array of collections in hierarchical format. Each collection has various detail about itself such as name, alias, image and etc.
nameReturns the name of the collection name.
aliasReturns the alias of the collection alias.
imageReturns the url of the image of the collection.
substoreReturns the substores in which collection are active.

Examples

Display all collections (vuejs themes)

<ms-entity entity="ms.collections">
    <div v-if="group.records?.length">
        <h3 v-for="collection in group.records">
            <a :href="'/collection/'+collection.alias" :title="collection.name">
                {{collection.name}}
            </a>
        </h3>
    </div>
</ms-entity>

Display all collections

<div ms-widget="ms.collections">
    <div ng-if="collections.length">
        <h3 ng-repeat="collection in collections">
            <a ng-href="/collection/{{collection.alias}}" title="{{collection.name}}">
                {{collection.name}}
            </a>
        </h3>
    </div>
    <div ng-if="!collections.length">
        <p>No collection exist!</p>
    </div>
</div>