-
AuthorPosts
-
November 5, 2017 at 11:30 pm #1072449
Hello,
I need to add an image to Extra fields. This new field will have no title, just the image
I’m following the instructions here:
https://www.joomlart.com/tutorials/joomla-tutorials/adding-joomla-custom-fields-in-article-with-t3-frameworkI open this file:
ja_decor/etc/extrafields/project.xmland i added:
echo ‘‘.JText::_(‘TPL_CLIENT’).’‘.$extrafields[‘us-thumbnail’].”;After this i have the field in my backend and i enter the link for the image, but nothing show in forntend.
I edit the file:
/ja_decor/html/com_content/article/default.phpand added this code after
echo ‘‘.JText::_(‘TPL_CLIENT’).’‘.$extrafields[‘us-thumbnail’].”;Now i have the title "Client" but no image.
Can somebody please give me a help on how to do this?
Other related question. I creat a new extrafield xml file, change it in the category, and when i edit the article i see the new fields in the backend. But when i check in frontend the old extrafields are still there and not the new ones.
Best regards
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 6, 2017 at 10:26 am #1072639Hi,
The code you added into XML file seems not correct, could you check again?
November 6, 2017 at 3:30 pm #1072708Hello, thanks for your answer.
I did a mistake when i was writing this post… sorry my fault.
The code i added to the xml file is a copy paste of the code you have on the https://www.joomlart.com/tutorials/joomla-tutorials/adding-joomla-custom-fields-in-article-with-t3-framework
<field name="us-thumbnail" type="text" default="" label="Thumbnail" class="input-xxlarge" description="User site thumbnail"/>
Is this code correct?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 7, 2017 at 9:15 am #1072872You can share the URL, Admin + FTP account of your site, I will check for you.
November 7, 2017 at 11:46 am #1072905This reply has been marked as private.Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 8, 2017 at 4:43 am #1073034Is there any cache settings in your server side? as I also tried to remove one of existing fields (for testing) but it keeps showing in article settings. So I guess your additional field doesn’t show because of this.
November 12, 2017 at 3:44 pm #1073792Hello Saguaros and thanks for your help.
I check with the hosting and there’s no cache settings on my server side.
I clean Joomla Cache too. So i’am guessing it’s not a cache related issue.
I think it’s a code related issue. Can you please provide me the code i need to add a picture in extra fields?
-
AuthorPosts
This topic contains 7 replies, has 2 voices, and was last updated by Saguaros 7 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum