English > Extensions and jDiction

XML for custom made params

<< < (2/3) > >>

Harald Leithner:
because your fields are saved in the database column "params".

are they showing up without fields? if not remove the second form-tag and include your complete xml in the first one.

jdiction merges the two xml files, so you can simply copy your data.

nkt:
The field shows up when I include it in the same form tag, however it looses the link with the original language as the tip(popup) content is empty.

Tonight I will work on it more. If you have another good idea, please let me know!

Harald Leithner:
look at the menu.xml its the same.

--- Code: ---<fields name="params">
  <fieldset name="FILTER" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
    <field name="namefilter1" />
<field name="namefilter1" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
<field name="namefilter2" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
<field name="namefilter3" type="text" label="PLG_CONTENT_CATFILTER_TEXT" description="PLG_CONTENT_CATFILTER_TEXT_DESC" size="30" />
  </fieldset>
</fields>

--- End code ---

try this code.

nkt:
Hi Harald,

I came to the conclusion that the translation part already worked for this code:

--- Quote from: Harald Leithner on April 29, 2014, 05:20:21 pm ---sure ;-)

you have to enclose the fieldset with a field tag


--- Code: ---<fields name="params">
  <fieldset name="FILTER" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
    <field name="namefilter1" />
  </fieldset>
</fields>
--- End code ---

--- End quote ---

However what confused me is that the tiptext in the admin screen stays empty.

This caused by the fact that
--- Code: ---$this->original
--- End code ---
in jform_25.php(view) contains the following:

--- Code: ---title = 'Onderzoek'
alias = 'onderzoek'
metakey =
metadesc =
description =
params = '{"category_layout":"","image":"","filter_exptag":"1","namefilter1":"Ik zoek een onderzoeksmethode voor:","namefilter2":"","namefilter3":""}'
jd_sourcehash ='...'

--- End code ---

Next in your code it is searching for the item called "namefilter1", however it will not find it, because it is placed under "params" as a json code.
I'll try to code it such that it takes the json variables and put them as items in the object.

PS above problem also holds for the menu params created by the menu.xml and for the alternative read more of a article.

Harald Leithner:
Correct I know the problem (but didn't have time to fix it)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version