This is a guide for a new feature recently added to Tribalogic's Directory Platform.
SEO is obviously a very important field and we have some advanced features in our directory platform to help you focus your SEO strategy. In previous revisions, users using our "Filters" system to give users simple, clickable filters to refine their search would have had some robots metatags forced upon them (note that this does not apply to Joomla users due to the OpenSEF extension). Location searches were automatically permitted to be indexed, but almost all other filters were not. This was pretty fixed and obviously inflexible. So we have introduced a powerful "Syndicate Replacements" system that can give you full control over the robots meta tag used and allows you to inject specific phrases onto matching results as well - ensuring that search engines can pick up on the specific searches you are promoting!
So in order to use the Replacement system, you need to know how to "match" a URL. This is done via a very power regular expression based system. We hope to eventually provide a wizard type interface to this, but for now it remains in it's raw form and we will explain a little bit about regular expressions here to help you get started.
Matching a specific page name
The URL we try and match against will always begin with the page name. So if we want to match, e.g. the "find" page only, we would use a regular expression of:
A caret at the start of a regular expression means that the matched text has to appear at the start of our URL. If the caret was not there the above regular expression would match any URL that contained the word "find" regardless of where in the URL that word was found.
In order to match search results containing only a location argument we would use the following regular expression:
The important part here is the $. When a regular expression ends with a $, it means that the matched text has to end with the preceding content. If the $ above was missing, URLs containing other additional arguments after location would also match which is not our goal here. Another important part is the "[^/]+" bit. This says "Match any character that is not a / one or more times". Square brackets are used to define a list of acceptable characters, but when a caret is the first characters it inverse the logic to say all the characters that are not allowed. In this example we match anything that is not a / (as a / would denote the start of another argument). The + sign means we match "one or more" of the previous thing, hence in this example we "Match any character that is not a / one or more times".
If you want to match a specific location value (e.g. Scotland) you can include the relevant value in your match:
Please note the number used above may vary on your installation.
You can also match against multiple arguments:
Note: Argument names always appear in the URL in alphabetical order, so when defining a match that requires multiple arguments, ensure you order them correctly otherwise it will never match!
So what happens after you've matched a URL? Well we can inject certain values into the page generated. Your page must be configured to accept the arguments you define here, so please contact us to discuss this. Once we have configured your page appropriately you will be given a list of keys you can define values for in the Replacements field.
This definition is pretty simple: each replacement is defined on a single line in the form:
Multiple keys will be defined as follows:
You will be told what keys are available to you when we configure your page. As a general rule we will include a "robots" key allowing you to specify e.g.:
For the URLs you want search engines to index (by default only the root (i.e. no arguments) search list will be indexable).
Advanced Usage: Dynamic Replacement Value Injection
The above not powerful enough for you? Don't worry, we offer an even more advanced feature: Variable replacement injection.
Consider the following URL match:
This matches any URL with a "location" argument. What if we want to inject that text into e.g. our page title or description metatag? We would define our replacements as follows:
title="All the best widgets in the %location% area"
description="In the %location% area? Looking for widgets? Find the best widgets in %location% with Happy Tribalogic Customer!!"
Note: your page will require to be configured with appropriate title and description replacement keys for the above to work.
As we know that our matching URL has a value, we can use the matched value (not the literal value in the URL, the nice form after interpreting it in our software). This allows our phrases to be customised and different which search engines will notice and help to rank the search results higher for searches containing these terms.
Advanced Usage: Optional Dynamic Replacement Value Injection
Want even more flexibility than the above? OK, you got it. How about this match:
Note: re7 comes after location - it's alphabetical.
The above URL match says we have to have re7/1 in our URL, but the location part is optional (the ? at the end of the containing parenthasised block does this). In this case we could use %location% in our replacements, but what if we don't know the locaiton? Well we can define a default value for this case in our replacements:
title="Find the best widgets in %location%"
So above we've explained how the various feature work with each other, but for your convenience here are some example URL Matches:
Match any find page containing both a single location argument and a single recreation argument.
Match any find page containing both a single facility argument and a single location argument. Note the ordering of the arguments
Match any find page containing a single facility argument and an optional single location argument
Match any find page containing an optional single location argument and a single facility argument. Again, note the ordering of the arguments and the careful inclusion of the / character at the appropriate places.