Data Sources

Data Sources

Data Sources provide a powerful way to retrieve data from any source and put it on the front end of the web site anywhere. There are 2 Tabs for Data Sources: Attributes and Formatting.

Attributes

  1. System Title: This is the title for the Data Source.
  2. Publish Start Date: This is the Start Date for the Data Source.
  3. Publish End Date: This is the End Date for the Data Source.
  4. CpScript: After the record is saved, you can click back into the record and copy the CpScript it generates to put it anywhere where CpScripts are supported.
  5. Cache Duration: This is the cache duration. If you're information tends to not change for long periods of time, you can set this to a longer time. Warning: any dynamic Data Source that uses attributes, taxonomies, query strings, etc cannot use cache. This will break what the Data Source will display.
  6. Data Source: This is where the information will be retrieved from:
    • Current Web Site: This is the current Centralpoint Database.
      • Module Cache: This caches a Module Data Source based on the Module(s) and the specific type of caching.It is not recommended to use the Cache Duration with this Caching type.
        • Modules: Please select the Module(s) you will be using in the Select Command.
        • Audience Specific: If this is enabled, please use this System Filter CpScript [cp:scripting key='SystemFilter' audience='true' date='false' enabled='true' role='false' currentAndFutureDate='false' /]. Note: some may have to be set to true if you using other specific types of cache.
        • Role Specific: If this is enabled, please use this System Filter CpScript [cp:scripting key='SystemFilter' audience='false' date='false' enabled='true' role='true' currentAndFutureDate='false' /]. Note: some may have to be set to true if you using other specific types of cache.
        • Date Specific: If this is enabled, please use this System Filter CpScript [cp:scripting key='SystemFilter' audience='true' date='false' enabled='true' role='false' currentAndFutureDate='true' /] and make sure you have StartDate and EndDate in the SELECT part of the Select Command. Note: some may have to be set to true if you using other specific types of cache.
    • Connection String: You can use a Connecton String to retrieve data from any source:
      • Database Provider: These are the Databases that Centralpoint supports with this option.
      • Connection String: This is the connection string for the database. All four options have different versions of the connection string.
    • RSS Feed: This will pull information from an RSS Feed. The fields available for the Formatting Tab are Title, Date, Link, and Content.
      • Url: This URL for the RSS Feed.
      • Number Of Items: This is the number of records to pull from the Feed. There is no SELECT Command for this option.
    • ATOM Feed: This will pull information from an ATOM Feed. The fields available for the Formatting Tab are Title, PublishedDate, UpdatedDate, Link, and Content.
      • Url: This URL for the RSS Feed.
      • Number Of Items: This is the number of records to pull from the Feed. There is no Select Command for this option.
    • Custom Source: This is a advanced option and will require a developers to create Custom method which will have to return an DataTable. The fields available for the Formatting Tab in the Example of the Custom Source are: Title, AutoNumber, DataId, AudienceSystemName and Parameters.
    • Twitter: This will pull information from an Twitter User Timeline. The fields available for the Formatting Tab are Body, CreateDate, RetweetCount, FavoriteCount, Source. In order to use the Twitter feed you will need to go to https://dev.twitter.com/ and log in using your Twitter crendentials. In the upper right hand corner there is a blue tab, hover of that and click 'My Applications'. This will take you to https://apps.twitter.com/. Click the button 'Create New App'. You will be taken to a page called 'Create an application' where you need to fill out information about the application. Name and Description should be descriptive like 'Main Site Twitter Source'. The Website and Callback URL must be your website's Home Page ie 'http//www.mysite.com'. Click 'Yes I agree' at the bottom and push the button 'Create Your Twitter Application'. This will take you to to the https://apps.twitter.com/ page where you can find your information for the Twitter parameters in the API Keys section. At the bottom of this page, push the button Create Access Token. This will allow Centralpoint to request information from Twitter on your behalf.
    • Slack: Please use the Slack Wizard to guide you through this Data Source.
    • Facebook: Please use the Facebook Wizard to guide you through this Data Source.
    • Yammer: Please use the Yammer Wizard to guide you through this Data Source.
  7. Select Command: This is the Query that is used to pull the data from a Data Source. You can use the Select Comman Builder to build a Select Command from any module. It is a wizard that lets you selects fields from a module.
  8. Supports Data Broadcast Member Profiles: If you want to filter by MemberProfile add: FilterByMemberProfile='true' to your DataSource cp:script.
    • Filter Member Profiles By: If you select to filter MemberProfiles by one or all of those fileds(DataId, Keywords or Taxonomy), then those fields must be included in the SelectCommand.

Formatting

Formatting Options give you the option to format your information in a certain way.

  1. Data List: The Data List puts the infomation out in a table format. This is the basic representation of the Data List. These are its attributes:
    • Repeat Columns: How many columns will the items display in.
    • Repeat Direction: This is the direction the List will repeat, either horizontal, or vertical.
    • Width: Controls the width of the container that will hold your content. You can specify a percentage or pixel based width.
    • Padding: This is the overall padding for the Data List in pixels.
    • Empty Item: If Data Source Script return no records and Empty Item Content is selected the Header/Footer Content will be included and text from Empty Item Content displayed, otherwise, it will not.
      • Error Message This will output an red error message.
      • Empty String This will output nothing on the front end.
      • Empty Item Content This will output what is in the RTF Editor.
    • Header Content: This will be placed at the top of the Data List output.
    • Item Content: This is where the information will be displayed.
    • Alternating Item Content: This is display alternating to the Item Content if there is a value in this RTF Editor.
    • Footer Content: This will be placed at the bottom of the Data List output.
    • Custom Styles: This is optional custom CSS that will be added to the Data List output.
  2. Image Slideshow: This is the basic representation of the Image Slideshow option. Here are the additional fields to change the functionality:
    • Slideshow Width: This is the entire slideshow width in pixels.
    • Slideshow Background Color: This is the background color for the entire slideshow.
    • Slideshow Padding Top: This is the padding top for the entire slideshow.
    • Slideshow Padding Bottom: This is the padding bottom for the entire slideshow.
    • Slideshow Padding Left: This is the padding left for the entire slideshow.
    • Slideshow Padding Right: This is the padding right for the entire slideshow.
    • Main Gallery Height: This is the main gallery region height.
    • Main Gallery Padding Top: This is the main gallery region padding top.
    • Main Gallery Padding Bottom: This is the main gallery region padding bottom.
    • Display Main Gallery Previous / Next Images: This will show the Left and Right Main Image Gallery Images.
    • Main Gallery Left Arrow: This is the image for the left arrow of the gallery. It will have a default image if none is selected.
    • Main Gallery Right Arrow: This is the image for the right arrow of the gallery. It will have a default image if none is selected.
    • Caption Background Color: The caption is made from the Define Title Field and Define Content Field 1 columns. This is the background color for the gallery caption popup.
    • Caption Text Color: This is the text color for the gallery caption popup.
    • Caption Opacity: This is the opacity of the caption.
    • Thumbnail Height: This is the height of the thumbnail. The width will automatically be generated.
    • Thumbnail Opacity: This will set the opacity for the thumbnails.
    • Thumbnail Padding Top: This is the padding top for the Thumbnails region.
    • Thumbnail Padding Bottom: This is the padding bottom for the thumbnail region.
    • Display Thumbnail Previous / Next Images: This will display the thumbnail previous and next images.
    • Thumbnail Tooltip: This will show a tooltip for the Thumbnail based on a column.
      • Thumbnail Tooltip Column Name: This is the Column name for the Thumbnail Tooltip contents.
    • Navigation Bar Text Color: This is the text color for the image count and the start and stop links (the Navigation Bar).
    • Navigation Padding Top: This is the padding top for the Navigation bar.
    • Navigation Padding Bottom: This is the padding bottom for the Navigation bar.
    • Navigation Padding Left: This is the padding left for the Navigation Bar.
    • Navigation Padding Right: This is the padding right for the Navigation Bar.
    • Auto Start: This will start the slideshow automatically.
    • Slide Show Effect: This is the effect for the slide show.
    • Animation Speed: This is the speed of the animation effect.
    • Auto Play Duration: This is the time in which images switch when the slide show is running.
    • Hide Navigation Bar: This will hide the image numbers and the start stop links.
    • Hide Thumbnails: This will hide the thumbnails from the slideshow.
    • Hide Main Gallery: This will hide the main image part of the slideshow.
  3. Paged Data List This is the basic representation of the Paged Data List. These are its attributes:
    • Limited Records: It is highly recommended that you use a SELECT TOP in your select statement and you select no more that 500 records. By choosing yes you have agreed to limit your record count.
    • Navigation Location: The location of the navigation. Options are Top and Bottom of information.
    • Header Content: This is the header of the datasource. This will come after the pager if the pager is at the top.
    • Item Content: This will be in each page. To reference Fields in Data Source use placeholders.
    • Alternating Item Content: This is the alternating item content.
    • Footer Content: This is the footer of the datasource. This will come before the pager if the pager is at the bottom.
    • Records Per Page: This is the number of records in the item content that will display per page.
    • Total Page Links: This is the total number of page number links that will display in the navigation.
    • Background Color: Background color of navigation.
    • Text Color: The text color of previous, next, and page number counts.
    • Previous Link Text: This the text of the previous link.
    • Next Link Text: This the text of the next link.
    • Page Inactive Text Color: The color of inactive page number links.
    • Page Inactive Background Color: The background color of inactive page number links.
    • Page Active Text Color: The color of active page number link.
    • Page Active Background Color: The background color of active page number link.
    • Text Decoration: The text decoration style of the page number links.
    • Width: The width of the navigation element.
    • Height: The height of the navigation element.
    • Minimum Page: If there is less than or equal to this number, the pager will be hidden. It defaults to 10.
  4. Raw HTML This is a representation of what the Raw HTML can do. These are are its attributes and examples of how this was created.
    • Empty Item: This will be displayed if If Data Source Script return no records.
      • Error Message This will output an red error message.
      • Empty String This will output nothing on the front end.
      • Empty Item Content This will output what is in the RTF Editor.
    • Styles: This is the custom CSS that can be used for this option.
    • Scripts: This is the custom JavaScript that can be used for this option. Centralpoint supports JavaScript, jQuery, jQuery UI.
    • Template Content: This attribute is used to wrap HTML, CpScripts, or text around the placeholder. [cp:placeholders key='ItemContent' /] The placeholder will get populated with the item content. This is an example from the image above:
      <table>
      <tbody>
      <tr>
      <th>ImageLink<th><ht>Title</th>
      [cp:placeholders key='ItemContent' /]
      </tbody>
      </table>
      			
    • Item Content: To reference Fields in Data Source use placeholders. [cp:scripting key='Column' name='NameOfTheField' /]. This is an example from the image above:
      <tr><td>[cp:scripting key='Column' name='Image' /]</td><td>[cp:scripting key='Column' name='Title' /]</td></tr>
      			
  5. Chart(Basic)
    • Empty Item: This will be displayed if If Data Source Script return no records.
      • Error Message This will output an red error message.
      • Empty String This will output nothing on the front end.
      • Empty Item Content This will output what is in the RTF Editor.
    • Title Column Name This is title column name in SELECT command. This will also show in the Legend as colors.
    • Number of Value Columns This is the number of value column names that the graph will represent. You will have 1 - 10 columns names to choose from from your SELECT command.
    • Title This is the title of the chart.
    • JCChartType These are the chart types for that you can display. There are extra attributes for each chart type.
      • Bar This is a basic representation of a Bar Chart.
        • Bar Group Margin This is the space around each group of bars in a bar chart.
        • Bar Margin This creates space around bars in the bar chart (added to both sides of each bar).
      • Area This is a basic representation of a Area Chart.
        • Line Width This is the width of the line in the area chart.
      • Pie This is a basic representation of a Pie Chart.
        • Pie Margin This is the space around outer circle of pie chart.