TwitterViewModel

Overview

The TwitterViewModel is used on the product details view when the social sharing features are enabled, to help render Twitter sharing correctly. This article will help you understand what's available to you in the view model.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of template engines
  • Understanding HTML, CSS, JavaScript
  • Familiarity with template languages
  • Familiarity with ASP.NET MVC Razor

Getting Started

There are no tasks needed to get started with understanding this object. 

TwitterViewModel

The TwitterViewModel object will contain all of the details to render Twitter in your Hotcakes Commerce store.

Members

The following table gives you details on the various members of the TwitterViewModel object.  The descriptions are based on default functionality and the default Viewset included with Hotcakes.

Member Type Description
CountPosition TwitterCountBoxPosition

This indicates to the Twitter API where the counter box feature of the widget should be.  The default is horizontal.  Possible values include:

  • 0 - None
  • 1 - Horizontal
  • 2 - Vertical
DefaultText String This value is determined by the Twitter administration settings you've set previously.  It's the text that will be sent to Twitter.
DisplayUrl String This property is used to tell Twitter which URL it should retrieve the count for rendering.
Language String The language that the Twitter widget should observe is specified in this object.  At this time, only English is supported.
LinkUrl String This should be the URL that you wish to have included in the tweet from the visitor.  It can be different than the page URL, if for example, you're integrating a URL shortener.
RelatedAccounts List<TwitterRelatedAccount> This property will contain a list of one or many related accounts that will be passed to Twitter.  This property is not used at this time.
ViaTwitterName String This property will have the Twitter name you specified in the social media administration area.

 

Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.