Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > UI Culture - Custom String - display value in WYSIWYG editor View modes: 
User avatar
Member
Member
tjadoon-gmail - 9/3/2010 12:43:48 PM
   
UI Culture - Custom String - display value in WYSIWYG editor
I have created a custom string under

Site Manage > Development > UI Cultures > English

The custom strings Key is called "MainFax" and the Text has fax number in it.

How can i use this in my WYSIWYG editor?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_radekm - 9/3/2010 12:52:08 PM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
Hello.

I am sorry, but I don´t understand where in WYSIWYG Editor you want to show this value from your UI culture custom string? Can you provide more details, please, or post here some screenshot, where I can see it? Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
tjadoon-gmail - 9/3/2010 1:03:42 PM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
The WYSIWYG editor is editable text webpart with html. I need to display static content like phone numbers and emails here - on other pages also.

We want the information in one location so that a change in place place get replicated all over.

On this same very note, can i create a new resource file in CMSResources. Put constants there and then pull information from here on the page.

Let say the resource file is called SiteGlobalResources.resx and the string name is "FaxMain". How can i use this in editable text - html webpart?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/22/2010 3:00:15 PM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
Hi,

you can use your resource string MainFax. Inserting following macro into editable region webpart the text of your string will be displayed.

{$MainFax$}


To see the result you need to click on the Live site button.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
batchahaja-socpa.org - 7/9/2012 7:58:15 AM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
I would like to do the same in ASCX Layout

I tried the fallowing but no use

<a href="#">{$Link1.help$}
Link1.help - is the custom string key value

but working in HTML Layout.

I Also try as below.

<asp:HyperLink ID="Link1" NavigateUrl="#" runat="server"></asp:HyperLink>
Link1 - is the custom string key value




User avatar
Member
Member
tjadoon-gmail - 7/9/2012 9:57:51 AM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
@batchahaja-socpa.org, i talked to one of the kentico consultants about 2 years back regarding the same issue and i was told that i can't use macros in inline controls. I tried to find that email but looks like i have lost it. If you find a way, please do let me know also.

If you need to know how to write macros, let me know and i'll send you the details.

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 7/13/2012 4:50:20 AM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
Hello.

This localization macro will not be resolved just like this. However, you can resolve it via CMS.GlobalHelper.ResHelper.GetString() method in your ascx(.cs) file.

Best Regards,
Radek Macalik

User avatar
Member
Member
tjadoon-gmail - 7/13/2012 9:21:05 AM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
@Kentico_radekm2, do you have some example code that i can look at?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/14/2012 12:00:26 PM
   
RE:UI Culture - Custom String - display value in WYSIWYG editor
Hi,

in the layout you can call custom method like:

{%#MyMethod()%}

and in your .cs file you can implement this method which returns value using API provided by Radek.

Something like is described here:
custom function in markup

Best regards,
Ivana Tomanickova