My Mirrors

Shortcodes

Shortcode: Define

A Define Shortcode has no Mirror ID.  A Define Shortcode instantiates nothing in the Post rendering of itself; its only purpose is to update the database, creating a new Alias in an Alias List.

A Define Shortcode will do nothing unless under an Admin login, or the login has my_mirror_define privilege.

A Define Shortcode will do nothing if its Resource ID is already represented in the Alias List, unless the login has my_mirror_redefine privilege.

(my_mirror_redefine privilege, if it implemented, exists only for use in a special login for correcting errors.)

The Define Shortcode exists only to provide a convenient shorthand for the creation of aliases via the copy and paste of a URL while in the Edit Page, without needing to go to the Admin Pages.

[[my_define list=???;  id=???; url=???; ]] 

— or —

[[my_define list=???;  id=???; alias=???; ]] 

Mandatory:

  • list    – An Alias List
  • id    – The Resource ID. If the Resource ID does not exist, an error is generated.
  • Either of:
    • url  – The Nominal URL.  Will be resolved to a Resource Name in accordance with the Filex associated with this mirror.   If there is no entry for this Resource ID in this List, an entry will be created associating this Resource ID with the Resource Name using the Resource Name Filex for this Mirror.
    • alias – Resource Name.  If there is no entry for this Resource ID in this List, an entry will be created associating this Resource ID with the Resource Name using the Resource Name Filex for this Mirror.

 

Section 9-1