Create and Run Advertisements on Your Portal

Create text or image-based ads and have them run in multiple placements throughout your site. Randomize ads or select specific ads for specific placements. You can choose release and expiration dates for time-sensitive, scheduled content. Ads can be hyperlinked to any destination and open in the current window or a new window. Advertisements are displayed in the portal via two CRM entities: The Ad Placement entity and associated Ad entity. Ads can be surfaced in many ways: with pre-made Liquid Templates available within the Adxstudio Portals application (Portals Version 7.0.0015+), via Liquid Templating/example Web Templates (Version 7.0.0013+), or within the desired .aspx page via MVC actions.

*Released with version 7.0.0013 were new Page and Web Templates within CRM. If you are using a version prior to 7.0.0013, or your portal was upgraded from a previous version, you will not have the CRM Web Templates referenced in this document. For instructions on to obtain the necessary templates reference this document.

*Released with version 7.0.0015 were Web Templates (not to be confused with CRM Page and Web Templates mentioned above) built within the Adxstudio Portals application. If you are running an Adxstudio Portal prior to this version you will not have the ability to utilize these Templates


Ads represent the specific advertisement or image which will appear on the portal at a given time.  The Ad entity will be displayed in the location specified by the Ad placement. The Ad must be associated with an Ad Placement in order to appear on the portal. For this demonstration the OOB example “Place Holder” Ad and “Sidebar Bottom” Ad Placement will be surfaced in the Company Portal to exhibit basic functionality and gain familiarity prior to creating more complex Ads. Any of the starter sites can be used in place of the Company Portal however, take note that the Liquid Templating used for this demonstration calls on the “Sidebar Bottom” Ad Placement name.

To Begin:

  • Navigate to Portals then Ads
  • Open the Placeholder Ad associated with the Company Portal website (this can be done with starter site of your choosing by clicking +NEW and creating an identical Ad sub the Website)
  • Click the Save icon in the lower right corner (or Save & Close in the upper left corner if you have created a new ad)

Within the Ad Form you will be required to specify a Name to describe the Ad, the Website where the Ad will be displayed, and a Publishing State. Optionally a Web Template and Release/Expiration date can be specified. *You must provide some sort of data for the Ad to display. Utilize the Ad entity attribute chart at the bottom of this page to craft the specifics of your ad.

Ad Placements

  • Navigate to Portals then Ad Placements
  • Click the Web Template Field to select a Web Template. For demonstration purposes the “Random Ad” Web Template was chosen.
  • On the right corner of the Ads grid click + to select the Ad created in the previous step
  • Click the Save icon in the lower right corner

When creating a new Ad Placement you will have to specify a Name to describe the Ad Placement and the Website where the Ad Placement will be displayed as required. The example Web Templates that enable use of Ads as an OOB feature of Adxstudio Portals were released with version 7.0.0013 and will be displayed within the lookup of the Web Template field in the Form. These templates are also intended to be used as a source to create custom templates. *Note again, if you are using a portal version prior to 7.0.0013, or your portal was upgraded from a previous version, you will not have the example Web Templates. You can obtain the Templates via the document link previously mentioned.

*Note that Ad created above will not display on the home page of the starter portal.

Using Liquid Templates to Place Ads

This template renders an Ad by name, or a random Ad from an Ad Placement. *Please note that currently the code below will not render multiple Ads in the Ad Placement (i.e. a rotating ad). To render multiple Ads in the Ad Placement a Liquid Ads API would need to be built. Reference built-in Web Templates here.

{% include 'ad' ad_name:'Name' %}
{% include 'ad' ad_placement_name:'Placement Name' %}

Content managers may use Liquid to add an Ad to any editable content area and can be referenced here and more specifically here.

1. {% include 'Random Ad' placement:ads.placements["Sidebar Bottom"] %}
1. {% include 'Ad Template' ad:ads{"Retail Ad - Go Greene"] %}

Using MVC Helpers to Place Ads

Developers may also use the AdPlacement MVC Action to place the Ad on the .aspx page that will be used to display the Ad.

1. <% Html.RenderAction("Adplacement", "Ad", new {
2. Area = "Cms",
3. id = "Sidebar Bottom",
4. __portalScopeId__ = Website.Id
5. }); %>


The Ad Entity has the following attributes:

Name Description
Name A descriptive name for the Ad
Website The associated Website  Required.
Web Template The associated Web Template that will be used by default to render the Ad. This field is optional; if it is blank the Ad will be rendered using a default template.
Release Date Controls a date/time after which the Ad will be visible on the portal.  If the Ad Placement is rotating through multiple ads, an unreleased ad will not show.  If no released ads are associated with an Ad Placement, nothing will appear.  This is useful for controlling the relase of time-sensitve content.
Expiration Date Controls a date/time prior to which the Ad will be visible on the portal.
Publishing State The current Publishing State.
Redirect URL When the Ad is clicked, the user will be navigated to this URL.  This field is optional.  If no value is given, the Ad will not be clickable.
Open In New Window Boolean.  If set to true, the Ad will open a new browser window when clicked.

A single line of text for the ad which can be displayed on the portal.  Whether or not it is displayed is determed by a propery on the AdPlacement control. This is primary useful for text-based ads or simple one-line links that you wish to place on the portal using Ad Placements. 

If the title is displayed, by default it will be rendered as a hyperlink which points to the Redirect URL. This behaviour may be altered by using a custom Web Template.


A multiline body of text or other web content that will be displayed in the ad placement.  This allows the placement to be used in a similar way to content snippets, but it is best to avoid using them to serve simply as a bucket to hold content (use snippets for that).  Instead, they are best used to display rotating image or textual content.

Image URL

The URL of the image which will be displayed by the ad. Optional; Use this field if you want the Ad to render a static resource or a webfile.  The Image will be clickable and link to the redirect URL, if one is given.

If an Ad has a note attached to it with a image file attachment, the Ad will render that as its image. This is possbily the most convienent way to set up images for ads, and ties the image directly with the Ad. In this case, Using the Image URL field is not neccessary.

Image width

Width of the image. 

*This field is not required but is recommended to ensure that the rendered Ad is valid and accessible HTML

Image Height

Height of the image.

*This field is not required but is recommended to ensure that the rendered Ad is valid and accessible HTML

Image Alt Text

Alt Text for the image.

*This field is not required but is recommended to ensure that the rendered Ad is valid and accessible HTML