1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 02:34:24 +02:00

Fix example in InputfieldTextTags for cases where it is used without a Fieldtype

This commit is contained in:
Ryan Cramer
2022-09-30 12:02:53 -04:00
parent 5d86dc8dec
commit cce5073969

View File

@@ -997,7 +997,9 @@ class InputfieldTextTags extends Inputfield implements
if($isTextField || $isPageField) {
/** @var InputfieldText $f */
$examplePath = "find-$this->name";
$inputName = $this->name;
if(empty($inputName)) $inputName = '[field_name]';
$examplePath = "find-$inputName";
$exampleUrl = "/$examplePath/?q={q}";
$exampleDescription =
sprintf($this->_('URL handler example in file %s for URL %s'), '<code>/site/init.php</code>', "<code>$exampleUrl</code>") . ' — ' .