Close

BLOGS

D365 CRM PORTAL: Some of the key features about the Web Template

Web Templates

Web Template is a CRM entity (adx_webtemplate), included with Adxstudio Portals, that is used to store template source content. A web template will generally contain Liquid for dynamic content rendering, and is the central entity used to integrate Liquid templates with the rest of the Adxstudio Portals system.

Web Templates can be included in other content or combined with other templates using template tags, and are referenced in these tags by their Name attribute. They can also be used to create entire custom Page Templates, or create a custom header and/or footer for your Adxstudio Portals Website.

  • - Web Template Attributes
  • - Web Templates as Page Templates
  • - Web Templates as Website Headers & Footers
  • - Built-in Web Templates

Web Template Attributes

Name: The name of the template. Used to reference this template when it is included in other content, or extended by other templates.

Source: The source content of the template. In CRM, a source code editor with syntax highlighting and other code editing features is provided for this field.

MIME Type: Optionally provides a MIME type for the content of the template. If none is provided, a type of text/html is assumed.

This value will only be used in cases where the template is associated with a Page Template, and controls the rendering of all content for that template.

Web Templates as Page Templates

Web Templates can be used in conjunction with Page Templates, to create new templates for the Adxstudio Portals content management system. This can be done entirely within CRM, without the need to write .NET code or redeploy your portal application.

To create a new Page Template based on a Web Template, select a Type of Web Template when creating a new Page Template record. Then select a Web Template.

 

Example: Page Template

Note the option Use Website Header and Footer (which is checked by default). If this is checked, your Web Template will control rendering of all page content between the global website header and footer. If this option is unchecked, your Web Template will be responsible for rendering the entire response – in the case that you're rendering HTML, this means everything from the doctype to the root <html> tags, and everything in between.

While the most common use cases for Web Templates will be to render HTML, rendering the entire response (by deselecting Use Website Header and Footer) gives you the option of rendering any text-based format you choose. This is where the MIME Type attribute of Web Template becomes relevant. When a Page Template that does not use the website header and footer is rendered, the HTTP response Content-Type header will be set to the MIME Type of the associated Web Template. (text/html will be used if no MIME Type is provided.) This gives you a wide variety of options for rendering non-HTML content using Liquid. A common use case would be to render an RSS feed, by setting a MIME Type of application/rss+xml.

Example: RSS Feed Page Template


Web Templates as Website Headers & Footers

Web Templates can also be used to override the global header and footer used by an Adxstudio Portals application. To do this, set the Header Template or Footer Template field of your Website to the Web Template of your choice. Note that if you override Website Header, your selected template assumes responsibility for rendering the primary navigation, sign in/sign out links, search interface, etc. for your site – interface elements that are normally handled by the default header template.

 

Example: Website Header

 

Built-in Web Templates

There is a set of pre-made liquid templates available within the Adxstudio Portals application. To use them, one needs to include them by name. Soon, one will be able to select them from a list in the front-side editing, but until then, one can use the list below as a reference.

 

Ad

This template renders an ad by name, or a random ad from an ad placement.

Code

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

 

Blogs

This template renders recent blog posts in a list group.

Code

{% include 'blogs' %}

 

Breadcrumbs

This template renders links of ancestor pages back to the Home page from the current page.

Code

{% include 'breadcrumbs' %}


Child Link List Group

This template renders links to any child pages of the current page in a list group.

Code

{% include 'child_link_list_group' %}
{% include 'child_link_list_group' title_only:true %}
{% include 'child_link_list_group' image_width:'64px', image_height:'64px' %}

 

Events: Upcoming

This template renders links to events that occur between now and 60 days from now.

Code

{% include 'events_upcoming' %}
{% include 'events_upcoming' number_of_days_in_advance:60 %}

 

Forums

This template renders a list of the website's forums with their respective number of threads and posts.

Code

{% include 'forums' %}

 

Layout 1 Column

This template renders a single column layout containing breadcrumbs, page title, and page copy content.

Code

{% extends 'layout_1_column' %}
{% block main %}
...
{% endblock %}


Layout 2 Column Wide Left

This template renders a two column layout. The left column is wider than the right. It contains breadcrumbs, page title at the top of the page and the page copy content is located in the left column.

Code

{% extends 'layout_2_column_wide_left' %}
{% block main %}
...
{% endblock %}
{% block aside %}
...
{% endblock %}

 

Layout 2 Column Wide Right

This template renders a two column layout. The right column is wider than the left. It contains breadcrumbs, page title at the top of the page and the page copy content is located in the right column.

Code

{% extends 'layout_2_column_wide_right' %}
{% block main %}
...
{% endblock %}
{% block aside %}
...
{% endblock %}

 

Layout 3 Column Wide Middle

This template renders a three column layout. The middle column is wider than the left and right. The layout contains breadcrumbs and the page title at the top of the page and the page copy content is located in the middle column.

Code

{% extends 'layout_3_column_wide_middle' %}
{% block left_aside %}
...
{% endblock %}
{% block main %}
...
{% endblock %}
{% block right_aside %}
...
{% endblock %}

 

Page Copy

This template renders the editable page copy content HTML with support for embedded Liquid.

Code

{% include 'page_copy' %}
Page Header
This template renders the page title.

Code

{% include 'page_header' %}


Poll

This template renders a poll by name, or a random poll from a poll placement.

Code

{% include 'poll' poll_name:'Name' %}
{% include 'poll' poll_placement_name:'Placement Name' %}


Search

This template renders a basic search form with a single text input and search button.

Code

{% include 'search' %}


Side Navigation

This template renders a vertical tree view style navigation. It has links to ancestor pages back to the first level (or specified depth offset), links to sibling pages of the current page, and links to children of the current page.

Code

{% include 'side_navigation' %}
{% include 'side_navigation' depth_offset:1 %}

 

Snippet

This template renders an editable HTML content snippet by name.

Code

{% include 'snippet' snippet_name:'Name' %}


Top Navigation

This template renders an editable nav bar with drop down menus for the Primary Navigation web link set.

Code

{% include 'top_navigation' %}


Weblink List Group

This template renders a list group of links for a web link set.

Code

{% include 'weblink_list_group' weblink_set_name:'Name' %}

 

 


 

Print
Posted: Aug 27, 2018,
Categories: Microsoft Portals,
Comments: 0,
Author: Urish Arora
Rate this article:
5.0

Urish AroraUrish Arora

Other posts by Urish Arora

, Contact author

Please login or register to post comments.

Name:
Email:
Subject:
Message:
x

SEARCH

Categories

Subscribe to our blog

«May 2019»
MonTueWedThuFriSatSun
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

  • Featured Posts
  • Recent Posts
  • Recent Comments
Dynamics365Authority is a community platform for Professionals and Students to contribute or share their knowledge and skills on Microsoft Dynamics 365 Technologies. Our primary goal is to invite professionals on Dynamics 365 technology across the world to contribute & share their knowledge and skills through their blogs so that we can help other developers.
Stay updated with Dynamics 365 technology. Improve skills and knowledge from our blogs, articles and code snippets. Learn it. Follow professionals and learn from them.
Unified Service Desk Book(Online Edition) 

FOLLOW US

Stay connected with us on our social media channels for latest articles, blogs posts etc.  We will keep updating regularly on our social media platform and web platform.

FACEBOOK

Follow us on Facebook

 

TWITTER

View all our tweets

 

DYNAMICS365AUTH

Join us now

 

BLOGS

View our blogs

 

 

Latest Blog

Posted: Apr 30, 2019

Find which privileges are applied to which roles in Dynamics 365 with privileges discovery

This blog is about Find which privileges are applied to which roles in Dynamics 365 with privileges discovery

Read more
Posted: Apr 30, 2019

Dynamics 365 Field Security

This blog is about Field Security in Dynamics 365

Read more
Posted: Apr 30, 2019

Access Team Templates in Dynamics 365

This blog is about Access Team Templates in Dynamics 365

Read more
RSS

ADDITIONAL RESOURCES

Dynamics 365 Authority.com - Search the library for "Dynamics 365"

  What's New in Dynamics 365

  Dynamics 365 Documentation

  

  Sign-up for 30 days trial

 

 

Recent comments

Ashish:

Nice blog. Very helpful to get all references to white papers at one place.

Previous Next

About Us

Here comes the Dynamics 365 Authority - Great technical blog posts are hidden gems. They are hard to find simply because not enough of us write them in the first place. Yet technical blogging is one of the best things we can do not only for ourselves, but also as members of the wider community of developers.

Dynamics 365 Authority leverages this platform to help developers and users to move from traditional paper-based process to modern digital business process. Dynamics365Authority.com helps your business grow, evolve and transform.

Dynamics365Authority.com is your Digital Transformation Partner

Recent Posts

Find which privileges are applied to which roles in Dynamics 365 with privileges discovery

This blog is about Find which privileges are applied to which roles in Dynamics 365 with privileges discovery

  • 3
  • Article rating: No rating

Dynamics 365 Field Security

This blog is about Field Security in Dynamics 365

  • 3
  • Article rating: No rating
RSS

Get in touch

Follow Us

 

Tag cloud: Dynamics365Authority.com with Urish Arora; Dynamics365Authority.com; Sales; Leading community site on MS Dynamics 365; Dynamics 365 Authority; Service;Top CRM Blogs; Urish Arora - Australia's leading expert on Digital Transformation;  Digital Transformation; Field Service;Top Articles on MS Dynamics CRM Relationship Insights; Office 365 Security Compliance; Project Service; Microsoft Dynamics 365 for Sales; Relevance Search; Goal Metrics; Activities and Case; Sales Literature;Knowledge Management;

Terms Of UsePrivacy StatementCopyright 2019 by Dynamics365Authority
Back To Top