Template:DisplayAttributeTemplate: Difference between revisions

From IAMC-Documentation
Jump to navigation Jump to search
No edit summary
m (1 revision imported)
 
(10 intermediate revisions by 2 users not shown)
Line 2: Line 2:
parameters:
parameters:
1) model:  
1) model:  
2} attribute
2) attribute
todo: make 1 query and send all infoermation to DisplayItemTemplate via format=template
3) subof
4) format optional if matrix then the matrixtemplate
</pre>
</pre>
</noinclude><includeonly>
</noinclude><includeonly><!--
{{#arraymap:
-->{{#ifeq:{{{format|}}}|matrix
{{#ask:[[IsAttributeOfModel::{{{model|}}}]][[HasAttributeLabel::{{{attribute|}}}]]|link=none}}
  |{{#ask:[[IsAttributeOfModel::{{{model|}}}]][[HasAttributeLabel::{{{attribute|}}}]]
|;|subobj
    | mainlabel=-
|{{DisplayItemTemplate_var
    |? HasAttributeLabel=title
  |title={{{attribute|}}}:
    |? HasDefaultOption=standardoption
  |standardoption={{#show:subobj||? HasDefaultOption|sep=;}}
    |? HasSelectedOption=option
  |option={{#show:subobj|? HasSelectedOption|sep=;}}
    |? HasSpecificOption=other
  |other={{#show:subobj|? HasSpecificOption|sep=;}}
    |? HasText=text
  |text={{#show:subobj|? HasText|sep=;}}
    |? HasList=list
  |comment={{#show:subobj|? HasAttributeComment|sep=;}}
    |? HasAttributeComment=comment
  }}
    |? IsSingleChoice#true,false=single
|}}</includeonly>
    |format=plainlist
    |template=DisplayItemInMatrixTemplate
    |named args=yes
    |valuesep=;
    |sep=;
  }}
  |{{#ifeq:{{{subof|}}}||
    {{#ask:[[IsAttributeOfModel::{{{model|}}}]][[HasAttributeLabel::{{{attribute|}}}]]
    | mainlabel=-
    |? HasAttributeLabel=title
    |? HasDefaultOption=standardoption
    |? HasSelectedOption=option
    |? HasSpecificOption=other
    |? HasText=text
    |? HasList=list
    |? HasAttributeComment=comment
    |? IsSingleChoice#true,false=single
    |format=plainlist
    |template=DisplayItemTemplate
    |named args=yes
    |valuesep=;
    |sep=;
 
  }}
  |{{#ask:[[IsAttributeOfModel::{{{model|}}}]][[HasAttributeLabel::{{{attribute|}}}]][[IsSubOf::{{{subof|}}}]]
    | mainlabel=-
    |? HasAttributeLabel=title
    |? HasDefaultOption=standardoption
    |? HasSelectedOption=option
    |? HasSpecificOption=other
    |? HasText=text
    |? HasList=list
    |? HasAttributeComment=comment
    |? IsSingleChoice#true,false=single
    |format=plainlist
    |template=DisplayItemTemplate
    |named args=yes
    |valuesep=;
    |sep=;  
  }}
}}
}}</includeonly>

Latest revision as of 17:17, 30 March 2020

parameters:
1) model: 
2) attribute
3) subof
4) format optional if matrix then the matrixtemplate