Documentation Videos Modules Stats back to home

BRT Server Controls

We have several server controls that you can paste into web pages and/or use in views in your site.  If you paste them into a web page, you need to do so in the "source" of the rich text editor and you need to check the "run .NET code" checkbox.

Here's a list of them and what they do.

The Console Forms Control

This loads a console form from the Console Forms object that is located in the Setup area of the Web Console.  You can create console forms based on objects and then expose them on your site.  For example, let's say you wanted to allow website visitors to submit classifieds, events, volunteer opportunities, etc.  You could make a console form and then paste in this code snippet.

<brt:ConsoleForm runat="server" FormName="" pkvalue="" ConsoleUserID="" NotifyEmail="" RedirectOnSubmit=""/> 

The Querylist Control

This will pull data out of the database and list it on the page.  You can either call a query in the "Queries" area by name or you can paste in your own code.  Organizations use it for showing stuff like staff or other simple data pulls that don't require a full contoller/view.  Here are some examples.

<brt:querylist replace="" template="" runat="server" consolequery="" runcode="true"/>

template - is a named template in the "templates" object.  You can create templates and then bind the query results to the template.  Keep in mind the binding of variables is case sensitive. Here is an example of how a template might look.  Notice that the variables that will be replaced have curly braces around them.  Your query will pull fields and those fields that are in the template will be replaced.  For example, let's say you pull a field called "title" and you have a {title} variable in your template, that will be replaced by the "title" field.

<div>
<h2><a href="/news/detail/{id}">{title}</a></h2>
<div class="pubdate">{pubdate}</div>
</div>

consolequery - is the named console query.  Go into Queries and make a query and then you can call it by name in this parameter. Here's an example of a query you might construct to bind to the template above.

SELECT TOP 10 title, written_date as pubdate FROM oNEWS ORDER BY written_date DESC

replace - you may want to have one query that is modified stightly for different uses.  For example, maybe you want to pull staff by department and you want to have a separate page for each department but you don't want to have to make a separate query.  You can make one query and then have it do a replace.  You simply put whatever you want replaced into a curly brace container.  If you put in this code

SELECT title from oNEWS WHERE NewsType = {newstype}

And you put into the replace parameter in the querylist control the value "1" then it would replace "{newstype}" with "1"  But, keep in mind, it will replace anything.  So you could have the curly braces around larger sections of the query.

runcode - Lastly, there is a parameter called "runcode" and if you set it to "true" then it will run .NET code within the query.  This means that you can even put controls within the SQL statement.  For example, maybe you want to run an email link obfuscator control for emails. That's a case when you'd use the runcode=true option.

The Commenting Control

details coming

The Email Link Obfuscator Email Control

details coming

The Gallery Control

details coming soon

RSS List Control

details coming soom

Captcha

details coming soon

Encryptor

details coming soon