How to select theme based on URL in Orchard CMS - asp.net-mvc-3

Suppose, I have a site named test.com and it has a selected theme of-course. Now I have other tenant site named alpha.test.com for which a theme is used also.
But I want to select the theme for the alpha.test.com from codes where orchard used to select theme. How it is? Please help.
My another question is how to select different theme for different controller or actions in Orchard CMS.

Just implement your own IThemeSelector and use a higher priority than the default one. Do not alter the existing one like has been suggested.

I think these links may help you:
https://orchard.codeplex.com/discussions/359115
http://weblogs.asp.net/bleroy/dynamically-switching-the-theme-in-orchard

There are no tables containing installed themes in Orchard but Themes_ThemeSiteSettingsPartRecord table is used to store the record for current theme only. If we want to select multiple/another theme based on URL then
Ans1 & Ans2: Specify the currentThemeName variable with desired installed theme Name in GetTheme method of SiteThemeSelector class located in Orchard.Themes/Services. If you want to apply different theme based on URL then set currentThemeName inside logic and URL may retrieved from context.HttpContext.Request.

Related

Shopify theme license

I build a new Shopify theme and want to sell it in the market but before that, I want to make sure that no one can use it without purchasing the theme license. How I can do this?
Thanks
Its possible but for that you need to setup your our server and create a database.
In the database create a table and add the following feilds.
domain, customer_name, customre_emaIl, store_URL, theme_status, lic_key
Then in the theme code you need to add some JS code and trigger AJAX call to your server with the store info and unique License key to validate the theme.
Now the trick is to hide you JS code in the theme. There are several methods i.e.
Use "eval()" function
Unicode
This is the basic idea behind the Licensed theme. For your reference the following theme is using this technique (I already worked on this theme that's why I know) :
Shoptimized
Thanks and best of luck

Managing contents in multilingual stores in Magento

This might be a basic question, I'm still relatively new to Magento. I have 2 store views in a magento project. 1 for English (default) and 1 for Japanese. While working with both store views, I noticed how if for example I switch to the Japanese store view, if I redirected to a different page or content on the store, the language goes back to English. How do I prevent the website from going back to the default language every time I change categories/catalogs?
That is all about Magento Admin setting. While creating Content Pages/Categories/products, there is a option that ask to choose Store View.
You can add content for Cateogries/Product/CMS Pages for each locale. If it is done then you'll be able to see your site content on the basis of current locale. Hence you need to go through Magento Admin first.
Hope it will work for you. Please let me know if any issue.
Managing contents in multilingual stores in Magento is easy.
Edit/Create Product/Category/Page/Static blocks according to need storeview and put content according to languages in that.
Now access pages by store code, if we are using that.
In some case we don't find the heading names according to languages so just enable inline translater from admin and do translation specific to store/website.
To run Magento store using urls we have both options index.php modifiction and using .htaccess using website and store codes.
On running Magento multisite , multistore. We generally face the common urls for media, js and other resources we should use symlink to increase SEO ranking and score.
Please feel free to contact.
Install your language package.
Create products, categories, pages, and static blocks on the basis of your selected language.
Sometimes translation does not work for few words. In those cases, Inline translation from admin will help you.
Managing content according to store view is very easy.
follow up below steps for managing content according to Store view.
Edit your product or category or your page and static block etc.
after that you can see store select left side in product and category and on page you can see feild below url in static block also. select your store view.
whater ever you want to change or edit please do according to you.
After that save it will apear only on your selected store.
Note: if you not edit any fild by store then it will show default store contents.

Custom layout update per site for one product

I have a multisite Magento running, and need to add a canonical URL for each product manually.
Since a product can be shown on different sites, each having different navigations, an since the custom layout update is [global], how can I get Magento to apply the custom layout update only if site/shop equals X?
I found the answer. I went to Catalog > manage attributes and set the custom_layout_update scope to store-view.

Magento Multi Store themes calling same login.phtml file

I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in magento. Both the sites are 90% over, last night when i planned to customize the login page i was shocked. The reason is the changes made in first store login page also reflecting in second store also. The login page is curently calling from
frontend/default/default/template/persistent/customer/form/login.phtml
Is it possible to give any custom login page? PLz guide me magento experts......
Please update your post with your frontend/ folder structure down to each theme template folder. It might be that you don't have a copy of login.phtml in the second theme. Moreover you should follow templates best practices as:
Always create for a new shop different packaga. So not
frontend/default
but
frontend/yourcustompackage
Always have default theme left as much untouched, as possible. So in the
frontend/package/default
Should be some basic changes and rules of your package. It means for example in the putting reset.css for all of your themes. Or something like this.
As for me, each store view should have own theme. So, for example, storeview1
frontend/package/storeview1/
There you copy and change files specific for this theme. So, for example, in default you might have login.phtml. But you want storeview1 to have another login.phtml and in storeview2 it should be the same as in default. Therefore you copy the login.phtml from default to storeview1 and change it there. Don't forget to change package and theme in System->Configuration->Design. Package should be change for whole shop and theme should be specified for every store view or left untouched for default.
P.S. Magento theme fallbacks
P.P.S. Try this tutorial or google another one
P.P.P.S. I hope, you got the answer for your question.

In a custom Joomla! template, how can I determine whether I am on the home page?

I am trying to create a custom template, but I want the template to look a little different for my Joomla! homepage/frontpage. Is there a easy boolean-type expression I can use to determine whether I am on my site's homepage?
That way, I can just say if ($on_homepage) { [custom homepage html] } else { [regular template] }
Thanks in advance!
You can create a separate template for your homepage. More details here.
This is very easy, just create 2 templates. One for your homepage and one for the rest of your site. Then install both, make sure you give them a descriptive name in their xml file so you know the difference.
Once they are installed you can set a default template that would be site wide. Then choose/click on your homepage template and it's options will load up. On the bottom left you can select the menu items where this template will be visible. This setup is very much like the way in which you define where modules are shown.

Resources