Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Adding Custom Text to a Theme does'nt work
jeongwee
✭✭
Adding Custom Text to a Theme does'nt work at all.
I added
"options": {
"text": {
"Custom Text": {
"Description": "Custom text to be inserted in the theme.",
"Type": "textbox"
}
}
}
to addon.json ,
and I added @{text code="Custom Text" default="YourSite @ 2018, All Rights Reserved."}
to the footer of the default.master.tpl which is in mytheme/views folder.
the footer does'nt show anything at all.
https://docs.vanillaforums.com/developer/addons/theme-options/
0
Comments
The information of the addon.json is cached in /cache/theme/nameoftheme.php and whenever you change the addon.json information of the current theme, you better should delete that cached file
i have cleared cache, YourSite @ 2018, All Rights Reserved. still not display on footer.
It's working as expected for me.
If it doesn't show up at all, you have other problems than the custom text, since the default value would appear anyway. Please check the HTML source if the text is maybe hidden or at another place than you have expected.
If you see the default value, but expect to see something else, have you assigned any value to this custom text already?
By the way: I don't like that "this and that isn't working at all" attitude of your questions.
it does work , i made something wrong on the punctuation .
sry, if you felt that ,i didnt meant to. i don't use vanilla for many years, and weak on doing the research myself with my bad english. as you see i have trouble installing the vanilla on cloud which really kill my patience ( actualy until now i havnt fisnish the instalation on the cloud ). anyway ,my apology if i made someone felt that way, i will keep in mind to speak well and with patience.
thx for the help.
it does shows the "YourSite @ 2018, All Rights Reserved." now , but i try to type anything on the custom text and press save . it always shows the "YourSite @ 2018, All Rights Reserved." so it always shows the default text when the custom text alrdy have been typed here.
In the docs, it shows the code key being
Custom Text
and this is also decoded and used as the label for the field. Is this just an encoding issue with the docs and the key is HTML encoded in the Vanilla PHP code, or is it intentional wherein the theme creator should make sure any spaces and other special characters are compatible with the config scheme (e.g.ThemeOption.Custom Text
) and therefore should type
for the space in this case?Anyway, since your addon.json file has
Custom Text
, you should try{text code="Custom Text" ...}
.Also, a lot has changed since Vanilla 2.5 and the new developer documentation is currently only in English, so I see how learning about new features might not be as clear for non-native English speakers.
Add Pages to Vanilla with the Basic Pages app
@R_J @Shadowdare
thanks, I fixed it !