The BLADE module generates URLs that generally rely on ID values of the requested data to ensure that the correct data is returned. Using names instead of IDs can be ambiguous and are subject to naming constraints to be URL compatible. However in certain situations where this limitation of names is acceptable and manageable it can be useful for a person to be able to generate the BLADE URLs manually using names.
This has been enabled for:
Media
As of 14.9.5.1 you can access a media item by providing the
Content Group name
Bin name(s)
can be multiple, nested bins
Item name
File extension (optional)
providing the extension is more specific.
=> blade/media/ContentGroupName/BinName/ItemName
=> blade/media/ContentGroupName/BinName1/BinName2/ItemName.extension
Example 1
In this example the content group name is Global and the bin name is USElections and the item name is Donald Trump.
blade/media/Global/USElections/Donald Trump blade/media/Global/USElections/Donald Trump.jpg blade/media/Global/USElections/Donald%20Trump.jpg
would be the same as using the ID value format:
blade/media/450657 blade/media/450657.jpg
Note that in the ID value format above the extension is optional.
Example 2
If you had a nested bin (a bin within a bin) then you might have an example like this with bins named leagues
and mlb
.
blade/media/Global/leagues/mlb/tor blade/media/Global/leagues/mlb/tor.png
URL based Images - Use redirect parameter
You will want to add the query parameter redirect=true
if your media items are URLs and you want the result to redirect to the URL.
blade/media/Global/leagues/mlb/tor?redirect=true
Scores
As of 14.9.3.5 you can access a league’s scores by providing the
Content Group name
League code
=> blade/score/league/ContentGroupName/LeagueCode/?format=json&logo=false&pretty=false
Example 1
In this example the content group name is Global and the league code is MLB:
blade/score/league/Global/MLB/?format=json&logo=false&pretty=false
would be the same as using the ID value format:
blade/score/league/2/MLB/?format=json&logo=false&pretty=false
Note that in the ID value format above - the MLB
is informative only. It could be any of the following and it would still return the Global MLB scores:
blade/score/league/2/?format=json&logo=false&pretty=false blade/score/league/2/MLB/?format=json&logo=false&pretty=false blade/score/league/2/RandomText/?format=json&logo=false&pretty=false