Hi Doze,
here is the documentation of tvExplorer
It’s not up to date but the main settings are there.
tvExplorer (tranlated by Lance)
on line demo
sample 1=>
http://www.dixsix.fr/explorer/
sample 2=>
http://www.dixsix.fr/explorer/index.php?id=406
What’s it for:
tvExplorer is an extension for the module tvEditor. See =>
http://modxcms.com/forums/index.php/topic,7472.30.html TvExplorer permits the restitution on the front of tv’s (and their value options)depending on their type, in a search form.
The results list is obtained with ditto.
All of the filters representing the search criteria are automatically generated by TvExplorer,
Only these tv types are supported:
-text
-checkbox
-option
-listbox-multiple
-listbox-single
-listbox
-dropdown
TvExplorer parameters:
Html form output
The form html is made with chunks,
The form creation relies entirely on the class makeform by Jason(openGeek),
&formTpl: The form chunk
Must contain the following placeholders:
[+action+] => url or id
[+name+]=> form name
[+method+]=> form send method
[+tvEditorForm+] => Will be replaced by the form elements,
Eg:
Quote
<form action="[+action+]" name="[+name+]" id="[+name+]" method="[+method+]">
[+tvEditorForm+]
</form>
To produce the elements we will almost always use two chunks:
one to wrap the series of elements,
one to render each element,
Eg: A series of checkboxes
The wrapper &listCheckTpl, contains a placeholder ([+listCheckbox+]) which will be replaced by the tv options.
&listCheckTpl:
Quote
<fieldset>
[+listCheckbox+]
</fieldset>
Each checkbox is rendered using &listCheckItemTpl
&listCheckItemTpl:
Quote
<label class="checkbox" [+for+]>
<input class="checkbox" type="[+type+]" [+id+] name="[+name+]" [+value+][+size+][+checked+][+disabled+][+style+][+events+]/>[+label+]
</label>
[+extra+]
Eg: A series of radio
The wrapper &listRadioTpl, contains a placeholder ([+listRadioItem+]) which will be replaced by the tv options in the form of radio buttons.
&listRadioTpl:
Quote
<fieldset>
[+listRadioItem+]
</fieldset>
&listRadioItemTpl:
Quote
<label class="radio[+required+][+optional+]" for="[+name+]">
<input class="radio" type="[+type+]" id="[+name+]" name="[+name+]" [+value+][+size+][+checked+][+disabled+][+style+][+events+]/>[+label+]
</label>[+extra+]
etc ...
In short the parameters for form output are:
&formTpl = Main form chunk
- Tv type text
&mitTpl = wrapper chunk element type="text"
&inputTextTpl = render chunk element type="text"
- Tv type dropdown, listbox
&selectTpl = wrapper chunk element type="select"
&optionTpl = render chunk element select options
- Tv type checkbox
&listCheckTpl = wrapper chunk element type="checkbox"
&listCheckItemTpl = render chunk element type="checkbox"
- Tv type option("radio")
&listRadioTpl = wrapper chunk element type="radio"
&listRadioItemTpl = render chunk element type="radio"
// these last chunks will not be used
// i will probalbly remove them in the final version
&hiddenTpl = render chunk element type="hidden"
&submitTpl = render chunk element type="submit"
A series of chunks used by default comes with the module tvEditor,
Filter management and personalization
To determine the filters to use for each tv and add/overwrite/modify certain values we use a chunk &chunkExtra
The creation of this chunk is obligatory for the snippet to work.
The syntaxe to use in the chunk
tv_name:property_name==property_value
To change options, property_name must be prefixed by o_
eg:
tagsPhoto::filter==1::question==<h3>The photo must contain the following tags</h3>::
o_className==required::
o_onclick==some_js_function()
To render "question" in the tv wrapper chunk we must add the placeholder [+question+]
Quote
<fieldset>
[+question+]
[+listRadioItem+]
</fieldset>
Selection of the tv’s integrated in the form and search:
&selectTV= list of tv names separated by a comma
Eg: &selectTV=`tagsPhoto,typeRecipe`
Ditto Parameters
&dittoName = Name of Ditto snippet to use
The other parameters are from the ditto snippet.
The parameters &tags, &tagData, &tagMode and &filter should not be incorperated into the call.
These will be created by tvExplorer automatically.
Example of use:
For the correct operation of the snippet, the parameter values should always be wrapped with backticks(`) => param=`value`
To incorporate the output of the form in your pages the placeholder should be just after the tvExplorer call,
[+tve.searchForm+]
The result list:
[+dittoList+]
Remarks:
There is no debug or error management for the moment