Page MenuHomePhabricator

New param property to indicate if param requires (or depends on) other param
Closed, DuplicatePublicFeature

Description

Feature summary (what you would like to be able to do and where):
We need new TemplateData param property to indicate that a param requires another (or depends on) other param.
The name may be "require" or "depend on" . The property value is an array of params.
TemplateData validator must check if array members are defined as params,

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Note: All cases below with case param (B) requires param (A)

  • The Template Wizard (in VE or source editor) currently warn user if he does not set a required param. With this new property, it will also warn user if he sets a param (B) and does not set param (A).
  • In Template Wizard When user inserts optional param (B) the wizard will automatically inserts param (A).
  • There are many examples for this in citation template, for example:

--"url-status", "url-access" and "access-date" all of them require "url"
--"dio-access" requires "dio"
--"author-first", "author-mask" and "author-link" all require "author-last"
and many other examples

Benefits (why should this be implemented?):
-reduce template errors.
-more understand to template params

Event Timeline

Esanders renamed this task from New param property to indecate if param requires (or depends on) other param to New param property to indicate if param requires (or depends on) other param.Sep 26 2023, 7:53 AM