Search:  

Previous pageData Integration Next page
Using the contents of a field as a DirectURL 

The Text datatype allows its value to be used as a DirectURL to enable Field Derived DirectURLs

 

A DirectURL is a shortcut that can be used to get to a specific page in a site, as an alternative to using the numeric addressing schema.
So, instead of www.domain.com/23 you could say www.domain.com/product 
Understanding and using DirectURLs is important in the creation of SEO optimized websites.
There is more information on Search Engine Optimization here...

If you have a Table full of products, it would be useful to have a set of DirectURLs, one for each product. By setting the checkbox against the Text datatype to say it should be treated as a DirectURL, and selecting the page on the site where the products are displayed, this function allows you to treat the value of the text field as a DirectURL, for each individual product - and when the visitor enters the DirectURL they are taken to that page, and the appropriate record from the Table is shown.

 


Note: This is also useful when you are converting a site from a legacy technology to use neatComponents, as you may have had a set of manually created static pages with names like www.domain.com/products/green_box.html (if you were selling green boxes). To allow people to still get to the right product using the old URL, simply add an extra text field, (call it something like 'legacy url'), and for that product, enter a value of 'products/green_box' (without the quotes). Then set the DirectURL target page to the page where your products are displayed, and then any links in to the old site will be honored by the new site. This will affect hard-wired links, and also links learnt by search engines.


 

Example: Set up a DirectURL

If you have a Table containing news releases, 'News' include a text field, called, say, 'DirectURL'.

For this field you check the box to say that it should be used as a DirectURL.
Set the target page to the page on your site where the query will be that will display the individual news story.

You can also set a prefix (ie 'news/')
Then if you have a record with a value of 'launch' in the DirectURL field, then that combines to give the url of {www.domain.com}/news/launch

Using Table-based DirectURLs in Query links

The assumption here is that you want to create a Query which will list out a number of the records in the Table, and provide links to them, as an index.

Normally, when you create a query to do this, the linking field will automatically contain one or more parameters which show up in the URL displayed on the browser's address bar. However, since we have a DirectURL which 'means' the same thing, we can use that instead, and not use the parameters.

To do this:

  1. Create your index Query, and be sure to include the DirectURL field.
  2. Configure the field that will be clicked on (presumably the Title or Name field) and click the button in the Link Target row to get the link picker dialog.
  3. In this, choose the Field dropdown and select the DirectURL field.
  4. Then click on the 'Parameters' tab, and select Custom, and uncheck all the parameters.

Now, when you use this index Query, the links will contain the DirectURL references rather than the parameters.

 


This technique can also be used if you are using a query as the basis for navigation links, and you again want the directURLs to be used instead of parameters.


 

Limitations

When you have Queries based on several Tables, or you have subqueries based on different Tables, your index Query links may need to include several parameters relating to more than one Table. In such cases it will not be possible to substitute the parameters with a single DirectURL, as the DirectURL only refers to a single record in a single Table.

 

 

 

Managing data