Difference between revisions of "DPL Example 030"
From FollowTheScore
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This page | + | {{Example|Generic Search Dialogue - links and template use}} |
+ | This page demonstrates how easy it is to create a search dialogue. We want to look for pages that link to a given page and use a certain template. | ||
<!-- | <!-- | ||
get command line arguments | get command line arguments | ||
− | -->{{Extension DPL}}{{#dpl:execandexit=²{#vardefine:target¦{%DPL_arg1:%} }²²{#vardefine:pattern¦{%DPL_arg2: | + | -->{{Extension DPL}}{{#dpl:execandexit=²{#vardefine:target¦{%DPL_arg1:%} }²²{#vardefine:pattern¦{%DPL_arg2:%} }²²{#vardefine:tpl¦{%DPL_arg3:%} }²}}<!-- |
user form | user form | ||
-->{{#form: action={{SCRIPTPATH}}/index.php | -->{{#form: action={{SCRIPTPATH}}/index.php | ||
− | |{{#input: type=hidden | name=title | + | |{{#input: type=hidden | name=title | value={{FULLPAGENAME}} }} |
− | pages linking to {{#input: name=DPL_arg1 | value={{#var:target}} }} | + | pages linking to {{#input: name=DPL_arg1 | value={{#if:{{#var:target}}|{{#var:target}}|Extension DPL}} }} |
− | starting with name {{#input: name=DPL_arg2 | value={{#var:pattern}} }} and using template {{#input: name=DPL_arg3 | value={{#var:tpl}} }}<br> | + | starting with name {{#input: name=DPL_arg2 | value={{#if:{{#var:pattern}}|{{#var:pattern}}|D}} }} |
+ | and using template {{#input: name=DPL_arg3 | value={{#if:{{#var:tpl}}|{{#var:tpl}}|Example}} }}<br> | ||
{{#input: type=submit | value=search }} | {{#input: type=submit | value=search }} | ||
}}<!-- | }}<!-- |
Latest revision as of 09:31, 25 June 2009
back to list of examples
Generic Search Dialogue - links and template use
This page demonstrates how easy it is to create a search dialogue. We want to look for pages that link to a given page and use a certain template.
{{#vardefine:target| }}{{#vardefine:pattern| }}{{#vardefine:tpl| }}{{#form: action=/dpldemo/index.php
|{{#input: type=hidden | name=title | value=DPL Example 030 }}
pages linking to {{#input: name=DPL_arg1 | value={{#var:target}} }}
starting with name {{#input: name=DPL_arg2 | value={{#var:pattern}} }}
and using template {{#input: name=DPL_arg3 | value={{#var:tpl}} }}
{{#input: type=submit | value=search }}
Extension:DynamicPageList (DPL), version 3.2.1: Warning: Skipping bad option 'Template:' for parameter 'uses'.
execution time: 0.002 sec. (2024/11/24 07:28:35)