FAQ

What skills are required to create websites in Relatude?

Relatude requires that you are familiar with C# and Asp.Net programming. You do not need to be an expert, but a general understanding of setting up a Asp.Net website in Visual Studio and understanding of the key principles in object oriented programming is needed. Knowledge of HTML, CSS and some javascript is also required. You do not need knowledge of SQL.

What do I need to install and develop with Relatude?

You need a copy of Visual Studio 2022 or newer. Relatude supports the following databases: Sql Server Express, Sql Server, PostgreSQL and SQLite.

What are the hosting requirements of Relatude?

For .Net 6/7/8:

Any hosting environment that you can run ASP.Net Core and .Net 6/7/8 on (Linux, Mac, Windows). Database servers supported is PostgreSQL and SQL Server (both Windows and Linux versions).

Azure, AWS and Google Cloud are all supported.

 

For .Net Framework versions

Any hosting environment that you can run .Net Framework on (Windows). Database servers supported is PostgreSQL, MySQL and SQL Server.

Azure is supported, but only Windows VMs or Windows App Services.

How can I set up IIS to host Relatude?

The recommended settings for an IIS website are:

  • Full access to the file system within the website root folder. This means giving the ASP.Net user and the App_Pool Process identity user (normally NetworkService) full access in the NTFS file system. On some systems the “Network Service” system user must be given full access to the .Net temp folder as well:
  • Run in full thrust mode
  • Pipeline mode: Integrated mode
  • Turn off App Pool recycling as much as possible:
  • Allow the IIS App Pool at least 400 mb of private memory limit before recycling. Be sure to check that your hosting partner meet this last requirement. Many shared hosting environments do not support this. Almost all dedicated server or virtual server hosting support it. See our website for recommended hosting partners.
  • To enable friendly URL’s you need to set up wildcard mapping to the .Net Runtime.

For more information on how to setup IIS please read Configuring IIS.

Typical errors you may encounter

  • Error: "CREATE DATABASE permission denied in database ‘master’. An attempt to attach an auto-named database file XXX.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share." 
    Possible solution: Change App pool identity from ApplicationPoolIdentity to some other such as LocalSystem.
  • Error: "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed."
    Possible solution: Disable Asp.Net Impersonation under the Authentication section in IIS manager for your site. Please make sure disabling impersonation is a valid option for your scenario.

What are the key steps in creating a template?

  • Create a controller and a corresponding view file. Ususally you have a _viewstart.cshtml file that sets the layout file.
  • Add your code to the controller and the razor file.
  • Log into Relatude
  • Go to the system module and the Templates section,
  • 'Create a new MVC template node.
  • Set the controller and action in the template.
  • Next, define which content classes can use the template.
  • The template is ready to be used. Open a relevant content and in the option tab you should be able to select the template you just created. IF only one template is defined for the content class in question, the template will be set automatically for the next node of that class you create.

How do I create a hierarchal navigation menu?

Most websites base their navigation on a hierarchal tree structure. In Relatude you can base the navigation on any relation or query you can do from any content node, but a hierarchal structure is often used as the base of the top level navigation. The content module in Relatude displays content in a tree structure based on the one-to-many relation “Native.RelHierarchal” which is represented by the “Parent” and “Children” property found on the “Native. HierarchalContent” base class. All content classes that inherit from this can be positioned in the tree structure found in the content module. The “Native.RelHierarchal” relation is consequently the widely used relation in tree menu structures.

There are of course many ways to render a tree based menu in HTML, but the logic and the recursive functions needed basically the same. Here is an example of a conventional tree menu where the selected item and branch are expanded and highlighted:

 

The sample of the output is:

Root document  

       Example article 1

       Example article 2  

            Example article 3

            Example article 4  

            Example article 5

Can I host multiple sites in one installation?

Yes. You can have many Relatude installations on one server. For each installation you need one license, but in each installation you can have several sites. Each site has its own set of contents and domains.

Sites in an installation share the same datamodel defined in the ontology (but you can restrict which content classes are available in each site. and also use separate namespaces in the code), but everything else can be completely separated. Each site can have its own set of users, templates, domains etc. and a limited user logging into Relatude would only see content and functionality relevant to his or her site.

For larger websites we recommend one installation per site unless the sites are sharing a lot of content. For portals etc. with many similar websites, one installation with multiple sites is a good solution as you as an administrator can manage through one interface.

How specific can I make the security settings?

In addition to all this. There are lots of other places you can restrict access like: Sites, Modules, File Libraries etc.

Access control in Relatude is done by referring to user groups. The membership of these groups determine the users access. Every content object in Relatude have three key access properties. The READ, the EDIT and PUBLISH access group. The users in the selected EDIT group can create new preliminary revisions, but cannot make direct changes that cause changes to live content. Only members of the selected PUBLISH group can do this.

In addition to this you can set the READ and WRITE access group on every property in the Semantics module. These properties can also be controlled in realtime and individually one each content as well by overriding access functions in the contents partial class file. (For example, let us say you wantet to restrict access to certain properties until certain other properties are set correctly.)

The membership of groups is primarily based on a relation property but it can also be based on a query and dynamic data. For instance this can be very useful if you want a usergroup for all users in the age range from 20-30 years of age. This would automatically make a user a member of this group as time goes by and his age is within the range.

What about caching, how does this work in Relatude?

Relatude has a built in content engine that is used for all content in the solution. The result is that absolutely all content is retrieved and updated through one API. (That includes, users, sites, documents, files, templates etc.)

Since everything is accessed through one API and runtime the built in cache in the content plattform is very smart and efficient. Every query is cached and every change refreshes the minimum and relevant part of the cache instantly. The result of this is that most content queries in Relatude are super-fast and up-to-date, even when content is changing continuously. As a consequence you do not need even consider the page cache system built into Asp.Net unless you are experiencing traffic in excess of 1 000 000 pageviews an hour (a lot of factors influence this number, so test your application). Relatude is of course compatible with the ASP.Net output cache system, but using it does complicate the template design as it does with any website with dynamic data.

How do I create a search page?

For search pages you will mostly want to query the built in Lucene index engine.

See the search documentation for more information.

How do I customize the authorization of user?

In Relatude you can override both the determination of a user identity and authentication.

The identity is by default aligned with the identity if the Asp.Net Identity user which by default is based on forms authentication. But sometimes you want to override this. 

The authentication mechanism is by default done by comparing the given password against the hashed password property of the SystemUser object. You can overload this method if you want to base this on other mechanisms, like looking up the user in a LDAP directory. 

What's the best way to check if you are on the frontpage?

If you want to know if the current node is the start or default node (homepage/frontpage of the site) compare the node id of the current associated node, with the StartNode referenced on the site node.

How do I create a home link?

To create a home link you can simple write <a href="/">home</a> if your site is on the root of the domain. However this has a drawback. In the preview of the Relatude edit interface this link will not retain state when navigating between pages in preview mode.   

The code below will make preview work better also when previewing your page for mobile.