Free Trial

Feature Update: Wildcard URLs

April 7, 2009 - 3:34 PM

What We've Been Up to Lately

Introducing Wildcard URLs

We've recently completed an update that we're pretty excited about: Wildcard URLs. This feature gives you the ability to create a Markup Factory page, blog post, event or other object that respondes to a range of URLs using the wildcard asterisk (*) character.  For example, you could create a page with the url /about/*.  This page would then be loaded anytime someone went to:

  • http://yoursite.com/about/staff
  • http://yoursite.com/about/location
  • or any other url beginning with http://yoursite.com/about/

Some new Runtime Variables

In addition to the wildcard urls update, we've added some new runtime variables that you can use in your templates, pages, and snippets.  These new variables give you the ability to read information about the URL of the page you are on.  Before I describe the variables, iet's talk about the structure of the Markup Factory URLs.  URLs in Markup Factory are divided into different segments, for example /path/path2/path3 etc. The new runtime variables then allow you to read an individual segment of the URL. You can reference these segments in MFScript by using the following runtime variables:

  • @path1 - contains the first segment of the url
  • @path2 - contains the second segment of the url
  • @path3 - contains the third segment of the url
  • ...
  • @pathN - contains the Nth segment of the url

For more info on using runtime variables, take a look at the MFScript documentation.

Using Markup Factory Wildcard URLs

You may be thinking, this is cool, but when would I ever use this? Wildcard URLs are exciting on their own, but you can really start to see the possibilities available when you use wildcard URLs with dynamic snippets, datasets and the @path runtime variables. Coupled with the dataset and dynamic snippet features, you can use wildcard urls to create a simple page that displays a specific record from a dataset based upon one or more of the @path variables. We'll save any more discussion on this for a later tutorial, but feel free to try out these new features in your site, and let us know if you have any questions!  You can also review the folllowing tutorial for more information on pulling content from your datasets based on the URL - "Tutorial: Adding URL-Specific Content to your Template using Datasets and Dynamic Snippets".

Copyright © 2024 Cramer Development also offering Web Design in Iowa City. All rights reserved.Terms of ServicePrivacy PolicyFAQContact Us