Date: Fri, 29 Mar 2024 01:37:23 +0000 (UTC) Message-ID: <1718950945.11.1711676243573@89313db7b986> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10_1933139048.1711676243573" ------=_Part_10_1933139048.1711676243573 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
"Work in Progress"
Currently migrating the docs from FC3 to FC4 and rewriting to reflect ho= w Friendly URLs work in Farcry 4.x.
See Friendly URL Management for existing docs.
FarCry manages content in a pseudo-object oriented way, through the so c= alled "content object application programming interface" or COAPI. This app= roach provides tremendous advantages for content management but has the dis= advantage of generating URLs that are parameterised by default. Parameteris= ed URLs are intimidating to users and difficult to remember and share.
For example, a typical parameterised URL in FarCry would be: http://www.farcrycms.org/i= ndex.cfm?objectid=3DA762FA21-EA69-0EC7-F9213952134B86E8
In contrast, Friendly URLs are defined as internet addresses that are bo= th easy for human users of the web site to read, and also meaningful for au= tomated spiders. FarCry has a special engine for automatically creating and= managing Friendly URLs for content generated through the system.
For example, a typical Friendly URL in FarCry would be: http://www.farcrycms.org/go/downloads/release-notes
All system level friendly URL management is handled through a specific c= omponent, /core/packages/farcry/fu.cfc
Database persistence is done in the "refFriendlyURL" table with the foll= owing fields:
status includes an "active permanent" state to accommodate the option fo= r FU's that have been manually created and should consequently not be autom= atically retired on content editing changes. As content is edited it is env= isaged that old FU's will be flagged to 0 while the current active FU will = have a state of 1. That is, refobjectid/status:1 should be unique.
Any content type (core or custom) can record any FU based on both proper= ties and logic stored in the content type, activated during editing, approv= al or any other stage of the content item lifecycle.
This enables content types to accommodate strategies for developing SEO = specific properties. How these SEO properties are populated would be wholly= dependent on the edit handler for the content type in question. For exampl= e, such a property could be a freeform field, calculated or selectively pop= ulated from any form of metadata engine for specific keyword taxonomies.
An example format for the friendly URL might be as follows: http://myproject.com/product/SEO-URL-Keyword/DocID
Note in this example we're using the /product/ prefix rather than /go/ s= eoURLKeyword - user defined property. Users select a word or phrase from a = predefined list of options. Multi-word phrases should be separated by hyphe= ns. (i.e. superfriendly-urls)
What happens when Friendly URLs change? FarCry holds onto old URLs, pers= isting them in the database and flagging them as defunct. That way we can d= o some better 404 handling in the go.cfm template. By default missed FU loo= k ups perform a second look up for deprecated URLs from the database and th= en redirecting the user if possible. As a last resort we pass the user thro= ugh to a 404.cfm handler.
Clients migrating content from old systems can write specific checks in = go.cfm, post FU lookup, to map old content to new locations and firing rele= vant 301 redirects. With the case of historical URLs that don't match the F= U pattern (probably most), we'd be proposing that the error handler or Appl= ication.cfm/.cfc look for the redirect before abandoning the user to a 404 = or missing objectid error.
It is critical to consider the nature of the redirect being performed, n= amely a 301, in order to preserve search engine page rank and indexation du= ring the move. Ideally this should be done using a specific HTTP header.
<cfh= eader statuscode=3D"301" statustext=3D"Moved permanently"> <cfheader name=3D"Location" value=3D"http://www.new-url.com">
Its possible projects may wish to utilise a cross content-type document = id that is different to a CF UUID. For example, the docid might carry throu= gh from a legacy system, or simply provide a simplified content key. At thi= s time I can see no issue with extending the refObjects table to incoporate= an additional column.
FU's can really be any parameterised URL, including variable-value pairs= beyond objectid=3DUUID. So it is feasible to incoporate sub-navigational c= ontext into an FU. However, the real issue is management of the FU and ensu= ring that accessories such as buildLink.cfm custom tag properly understand = the extended concepts.