Question here, let's say I have a english flag in Footer (a png image) and if I am on Danish website - I would like to see Danish flag instead (also png image).
Is there any way I could set this up somehow in Umbraco and manage it quite easy (simmilar to Dictionary items) or in aniway avoid xslt/razor macros. Or as I said before, something simmilar to dictionary?
Culture specific image?
Hello Umbraco guys :-)
Question here, let's say I have a english flag in Footer (a png image) and if I am on Danish website - I would like to see Danish flag instead (also png image).
Is there any way I could set this up somehow in Umbraco and manage it quite easy (simmilar to Dictionary items) or in aniway avoid xslt/razor macros. Or as I said before, something simmilar to dictionary?
Thanks alot for help! :-)
//Dmitrij
Comment author was deleted
Well you could use a dictonary item to store the image path :)
Hej Tim,
hmm.. that is good idea ;-)
But let's say you have a 3-5 lines of HTML content that includes a picture and you wanted to make that culture specific...
is there a possibility in a template to make a quick check like:
<!-- if english version -->
use this markup... (my image is here)
<!-- end if -->
<!-- if danish version -->
use this markup... (my image is here)
<!-- end if -->
That can be done in XSLT for example, but is there a way to do something like this dirrectly in the template?
//Dmitrij
Comment author was deleted
yeah dictionary items :)
No need to do a culture specific check in templates that's what the dictionary items are form
Say you are using razor you can just do
<img src="@Dictionary.myKey" />
and store the path to the image in the dictionary
So if I correctly understand you actually are able to store html codeblocks in dictionary items?
Because that is what I meant in previous post - I want to avoid macros (for this specific situation I have here on website) for now...
If your storing actual HTML in the dictionary, you probably want to ouput it as:
@Html.Raw(Dictionary.myKey)
is working on a reply...