Difference between revisions of "CreateTopicForm"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
Line 17: Line 17:
 
{%- set dump = topic_properties.append(p["name"]) -%}
 
{%- set dump = topic_properties.append(p["name"]) -%}
 
{%- endfor %}
 
{%- endfor %}
{%- set property_printouts = "" %}
+
{%- set property_printouts = namespace(query_vars="") %}
{%- set dump = [ property_printouts := f"{property_printouts}|?Property {p}={p}" for p in properties] -%}
+
{% for p in properties %}
 +
{%- set property_printouts.query_vars = property_printouts.query_vars + "|?Property" + p + "=" + p -%}
 +
{%- endfor %}
 
{%- set topic_property_properties = [] -%}
 
{%- set topic_property_properties = [] -%}
{% for pp in smw.query("[[Property topic::" + row.Topic + "]]" + property_printouts).values() %}
+
{% for pp in smw.query("[[Property topic::" + row.Topic + "]]" + property_printouts.query_vars).values() %}
 
{%- set dump = topic_property_properties.append(pp) -%}
 
{%- set dump = topic_property_properties.append(pp) -%}
 
{%- endfor %}
 
{%- endfor %}
 
{%- set property_properties = [] -%}
 
{%- set property_properties = [] -%}
{% for pp in smw.query("[[Property topic::Concept:Property]]" + property_printouts).values() %}
+
{% for pp in smw.query("[[Property topic::Concept:Property]]" + property_printouts.query_vars).values() %}
 
{%- set dump = property_properties.append(pp) -%}
 
{%- set dump = property_properties.append(pp) -%}
 
{%- endfor %}
 
{%- endfor %}
 
Debug properties:{{ properties }}
 
Debug properties:{{ properties }}
 
Debug topic_properties:{{ topic_properties }}
 
Debug topic_properties:{{ topic_properties }}
Debug property_printouts:{{ property_printouts }}
+
Debug property_printouts:{{ property_printouts.query_vars }}
 
Debug topic_property_properties:{{ topic_property_properties }}
 
Debug topic_property_properties:{{ topic_property_properties }}
 
Debug property_properties:{{ property_properties }}
 
Debug property_properties:{{ property_properties }}

Revision as of 01:36, 15 February 2021

Sourcecode

Sourcecode
edit
id  CreateTopicForm
lang  jinja
author  Tim Holzheim
since  2021/02/14
test  
'"`UNIQ--pre-00000000-QINU`"'
url  

Freitext