This error is related to the length of your string. It doesn't fit in the length of the dictionary field. Maybe better to not include complete HTML in dictionary items as well.
I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well
I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well
In that case you don't need a dictionary item. Use it on a document type, maybe homepage? And call the macro in your template instead of a dictionary item.
I've looked into the database out of curiousity - there seems to be a limit of 1000 characters (the dbo.cmsLanguageText table). Perhaps it could be possible just to loose this restriction by altering this table directly - not that safe a hack I suppose, but I imagine it could work...
A 1000 characters should be more than enough for the correct use of dictionary items. They are not intended to be placeholders of large amounts of HTML and ideally I don't think HTML belongs in a dictionary item.
The way I see it dictionary items should be used in scenarios where you have multiple sites but need to display different "system" texts like for instance an error message, placeholder texts, label etc. - stuff that does not belong in content.
In some cases it can probably make sense to store a minor amount of HTML in there but if you're storing more than 1000 characters of HTML in there you're doing it wrong in my humble opinion :)
Hi Guys, its only now that i can get back to working on this. Is there a better way for me to add this to my multilingual website?
I do realise this is a dictionay item where only small amount of texts is allowed but somehow i have a static menu list item which needs to be added in the template.
@Richard .... i did try the macro container which works but i dont think that will help since this menu needs to be visible on the whole website and on the FR version as well.
So you have this static menu - I suppose you need to translate the text in it? Then you could make a dictionary item for each of the texts and then use the umbraco.library:GetDictionaryItem('dictionary item 1') and umbraco.library:GetDictionaryItem('dictionary item 2') and so on, right?
In the static macro you would just call the above where you need the text to be replaced with the correct text according to the culture.
Yes i makes sense, i was also thinking of creating a folder node outside the my EN version and use a macro to pull the info. And use the id source in dictionary item.
But i think ill go with your suggestion. It sucks having to add a static menu a whole 120 page website!!!
Error when saving dictionary item
When saving a Dictionary item with a simple UL List item with link in it a get a Server Error.
Can someone explains ?
//fuji
Hi Fuji
What does the error say exactly?
And is it HTML you're saving in the item?
/Jan
HI Jan,
Yes its basic Html. <ul> <li> <a href=""></a><li> </ul>
Here is the Error output
String or binary data would be truncated.
The statement has been terminated.
This error is related to the length of your string. It doesn't fit in the length of the dictionary field. Maybe better to not include complete HTML in dictionary items as well.
But if you make the list smaller it will store
Cheers,
Richard
I guess so but thing is its a static Menu Item which with links that will give access to some other website.
The trend will be applied to the other website. The menu is giving access to 8 other websites for the same client but different domain.
Is there an alternative to this?
//Fuji
I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well
Cheers,
Richard
I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well
Cheers,
Richard
But how will i add it to my Dictionary Item?and in my template?
In that case you don't need a dictionary item. Use it on a document type, maybe homepage? And call the macro in your template instead of a dictionary item.
Cheers,
Richard
I've looked into the database out of curiousity - there seems to be a limit of 1000 characters (the dbo.cmsLanguageText table). Perhaps it could be possible just to loose this restriction by altering this table directly - not that safe a hack I suppose, but I imagine it could work...
A 1000 characters should be more than enough for the correct use of dictionary items. They are not intended to be placeholders of large amounts of HTML and ideally I don't think HTML belongs in a dictionary item.
The way I see it dictionary items should be used in scenarios where you have multiple sites but need to display different "system" texts like for instance an error message, placeholder texts, label etc. - stuff that does not belong in content.
In some cases it can probably make sense to store a minor amount of HTML in there but if you're storing more than 1000 characters of HTML in there you're doing it wrong in my humble opinion :)
/Jan
...Oh and by the way - never mess with the database, it's just begging for trouble :)
Yes, Jan, I agree completely. I just tried to suggest a probable rapid solution for a case like 'we-badly-needed-it-the-day-before-yesterday' :-)
Hi Guys, its only now that i can get back to working on this. Is there a better way for me to add this to my multilingual website?
I do realise this is a dictionay item where only small amount of texts is allowed but somehow i have a static menu list item which needs to be added in the template.
//fuji
@Richard .... i did try the macro container which works but i dont think that will help since this menu needs to be visible on the whole website and on the FR version as well.
Hi Fuji
So you have this static menu - I suppose you need to translate the text in it? Then you could make a dictionary item for each of the texts and then use the umbraco.library:GetDictionaryItem('dictionary item 1') and umbraco.library:GetDictionaryItem('dictionary item 2') and so on, right?
In the static macro you would just call the above where you need the text to be replaced with the correct text according to the culture.
Hope this makes sense to you.
/Jan
Hi Jan,
Yes i makes sense, i was also thinking of creating a folder node outside the my EN version and use a macro to pull the info. And use the id source in dictionary item.
But i think ill go with your suggestion. It sucks having to add a static menu a whole 120 page website!!!
//fuji
is working on a reply...