Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Change direction at runtime


Hi. Is it possible to change direction of metronic at runtime ?
I have an asp.net core application using metronic 8.1.6 template and i need both rtl and ltr versions. When user changes the language , for example persian or arabic, it's need to change the direction to rtl .I tried to change themesettings.json values at runtime to setDirection but doesn't work.Any help please ?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Thanks Lauris for your support. The problem I was dealing with for two days was solved with your help . happy
Thanks a milion



Hi,

Glad to hear that. All the best with your project!

Please don't hesitate to reach out if you need anything more from us.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

Hi,

Thank you for reaching out to us.

In our Metronic Asp.Net-Core Starterkit RTL and LTR directions are supported, in configuration, you can setup a default version.

If you want to switch direction on runtime then you need to update InitThemeDirection function, instead of setting a static value from the configuration you can set direction from cookies or your database.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

That is a great knowledge that we can change direction on runtime. But consider me as a beginner, can you please show me an example in Blazor project demonstrating the changing of direction on runtime.

Hope you will consider this request.

Regards
Nabeeh T


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(