Joomla Change Recommended Default Field: Yes
the Joomla Add / Edit article has a Recommended field which is selected as None by default . I want to select Yes by default, so in
Joomla \ admin \ component \ com_content \ model \ form \ article.xml
I change the code according to my requirement
<field name="featured" type="list"
label="JFEATURED"
description="COM_CONTENT_FIELD_FEATURED_DESC"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
to
<field name="featured" type="list"
label="JFEATURED"
description="COM_CONTENT_FIELD_FEATURED_DESC"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
but it doesn't select Yes by default, but just change the JYES text to JNO , although it changes but doesn't set featured in the db
+3
Php ferrari
source
to share
2 answers
You must do it for both:
[siteroot]/administrator/components/com_content/models/forms/article.xml
as for
[siteroot]/components/com_content/models/forms/article.xml
Thanks everyone for the tip that helped me solve this problem.
+2
UrwieUrwie
source
to share
Change the value to "1" in "joomla \ components \ com_content \ models \ forms \ article.xml"
No need to change the text from JYES to JNO. I've tested both in Joomla! 2.5 and 3.0, and works as in
0
clickers
source
to share