Language Keys not working in the Injections
Hello,
I have been trying to add some links into the footer that should appear globally on the website (all the pages) through Designer > Body Injection,
Example:
<div id="bx-footer_2" class="bx-footer_2">
<a href="organizations-home" title="<bx_text:_bx_orgs_page_title_browse />"><bx_text:_bx_orgs_page_title_browse /></a>
</div>
Unfortunately, Language keys don't work. They work well in the Raw block but not in the injections.
How to get a language key e.g. <_bx_orgs_page_title_browse/> to work in the injections? @LeonidS @Anton L
I am using the Artificer template.
Thanks
-
- · thomlin
- ·
You could try as it shows when you hover over the link in your post.
<bx_text:_bx_orgs_page_title_browse />
And give a space before the slash.
-
Oh sorry, That's exactly what I did. I have posted it in my original message but the editor removed the code. So I have edited my original post and the code is showing properly now.
it's <bx_text:_bx_orgs_page_title_browse /> that doesn't work. Any idea?
-
- · thomlin
-
·
In reply to OneEagle
- ·
Ok, in that case we've done it the same way. I can't think of any other solution, sorry.
-
- · Someone07
- ·
hello,
is there a special reason, why you want to do this as injection?
i use the navigation app in studio to set up footer links, they are also global and you can edit the language very simple.
yourdomain.com/studio/builder_menu.php?page=items&module=system&set=sys_footer
-
- · OneEagle
- ·
Hi, Yes, there is a special reason. I would like to link some pages to all pages and I would like to separate them from the default UNA footer links (Kind of another set of footer links) Also I would like to have a responsive four-column Bootstrap footer where I will also put my Android and IOS App badges and my social network icons (facebook, twitter etc).
-
ok, never tried to do this with injection, maybe this works not, but i am sure, @LeonidS will give you the right answer
do you mean it should looks a little bit like on my site - see on screenshot
-
Yes, Kind of.
-
- · OneEagle
- ·
The html code and links works well in the injections. The problem is the Language Key. How to get the language key to work in Designer > injections > the body injections? @LeonidS
-
- · OneEagle
- ·
Any idea? @LeonidS
-
- · OneEagle
- ·
Hi @Alex T⚜️ Would you mind telling how to get the language key e.g. <bx_text:_bx_orgs_page_title_browse /> to work in the injections (Designer > Body Injection)? It doesn't work. Thanks
-
- · OneEagle
- ·
Hi @Anton L Please could you help with this one? How to get the language key to work in the injections. Thank you.
-
-
·
Anton L
- ·
Hello.
Injections in UNA are special template constructions which are parsed at the VERY last. So, by default template keys like <bx_text /> cannot be use in injections.
-
·
Anton L
-
- · OneEagle
-
·
In reply to Anton L
- ·
Hello @Anton L
Thanks for you reply. So any solution on how to get the language keys work in the injections. Injections are the seamless way to add things to the footer globally.
-
-
·
Anton L
-
·
In reply to OneEagle
- ·
Hello.
Unfortunately, the current version of UNA doesn't allow to use language keys directly in injections. As I wrote it happens because of structural usage of injections.
The only way I see is to use 'service' based injection. In this case the PHP service is executed first and therefore the languge key will be translated.
-
·
Anton L
-
- · OneEagle
-
·
In reply to Anton L
- ·
Thanks for your reply @Anton L . Sorry for the late answer. I didn't see the notification when you relied.
BTW, what is a service based injection? Is this a special module? Sorry for my question. And how to use it. Thanks for helping.
-
-
·
Anton L
-
·
In reply to OneEagle
- ·
Hello. Injections in UNA can be 'text' or 'service' based. The first variant is used in Studio -> Designer -> Injections. The text from HEAD/BODY injection fields is taken and inserted as is. Service based injection requires a service method which will be called to get the content to inject. Unfortunately there is no way to use it via Studio.
-
·
Anton L
-
- · OneEagle
-
·
In reply to Anton L
- ·
Well, I understand that there isn't any practical solution for this specific case in UNA core. Anyway. thanks