How do I localize the names of menu items in Sitecore? - sitecore

I'm creating localizations--in Spanish and Chinese--for a Sitecore site. The original language is English. I've learned how to create my language-specific versions of pages. But I don't know how to change the names of the the navigation items themselves. When I preview my pages in Spanish (http://content.example.com/?sc_lang=es), for example, the page content is in Spanish, but the navigation items themselves (e.g. Home, About, Products, etc.) are still in English. Where in the Content or Page editors do I fix that?

You need to modify the "display name" of the item in the Home ribbon. Be aware that this also affects the url of the item For the chosen language.
Edit: maybe I was too quick with my answer, I probably overread something cause my suggestion changes the Url (if you have the setting "useDisplayName=true" like jammykam corrected) and the name of the item in the content tree for the specific language.
If your the names displayed in the navigation is based on the Item names, then can do as I suggested, change the display item's name for the current language and make the code look at the display name inestead of the item name.
Another option is to use a separate field for the menu-title in case you want your titles to differ from your url's.

When you say the navigation items themselves are in still in English, what do you mean? As in, the menu running along the top of the page?
If so, then you need to figure out where in the content tree those items are and then add in the relevant language versions/translations, and make sure they are not "shared" content.
#Martijn, I believe it only affects the URL is you set "useDisplayName=true" in the linkManager setting in config.

We usually add a field called MenuTitle to the base content template and then instruct our navigation controls to read from that field

For menus, we generally use a different field for the page's title and the page's navigation title. This allows for a shorter version to be specified by the author for the menu.
Once you have that, you just need to make sure you build code in your header control to find the target item of the menu link (I assume it's a general link, or some other Item reference) and pull the target item's navigation title.
When the code does this, it should automatically pull the version of that target item based on the current language, which will mean you will get your navigation title in the correct language.

Related

Sitecore Page Editor Add New Page Inline

In my content tree, I have "Folder" items that have no presentation, but have all the insert options on them. How would you be able to use the "Insert Page" button in the ribbon to insert a new content item in the right part of the tree?
For Example:
I have my home page Content(Folder)/Home.item
All of my insert options are on Content(Folder), how do I add a new Home.item type without nesting it under Home.item?
In order to be able to use the Insert Page button, the item you are inserting under must have Presentation defined. It doesn't need to have components added, and I've worked round this before by simply define a "blank" layout and setting it on those items. Maybe create yourself a new template (inheriting from Folder) and then set Layout on that. But, this is a workaround at best. You can only "Insert Page" below the current page you are on, so you would essentially have to navigate to a blank page in order to create the sibling.
From what you have stated, it sounds like you may want to re-think where your Insert Options have been set and your content structure, i.e. why would you want create another Home item? Creating so will require set-up of another <site> and related config. You probably also want to separate those sites out with other settings, there is some good example of multi-site structure in this blog post. If you go down this route look into using Branch Templates. But, difficult to know what you are doing without context...

Joomla Category Home Pages

Is there any way in Joomla2.5 to create Home/Landing Pages (ie. "default") pages for each category.
For example, I would like the user to be able to go to www.somejoomlasite.com/category1 and see a default home page for category1, and a different home page for category2 and so on. Is there any way to achieve this? Could I create an article under each category and set it's alias as index? or will I get an error about having duplicate aliases (even though they are under different categories)?
Any help is greatly appreciated. Please let me know if I need to provide further info.
An alias has to be unique within a category. So you should be fine using the same alias in different categories.
You should be able to achieve a structure like you described with menu items for each category. And of course SEF needs to be turned on with rewrite enabled.
The menu items don't need to be visible on the page, you can also create a "hidden" menu. Just don't show the accompagning menu module.
These menu items can be anything: a category list of the articles, an article itself, a featured list of articles in a category or whatever you like.

Sitecore Language used for Display Name of items in a Treelist or Multilist

In a Sitecore Treelist or Multilist, items available for selection and items that have been selected are displayed using their Display Name. However, the language version that the Display Name is pulled from is the current Client Language, not the currently selected language of the item being edited.
An example illustrates the problem a little better...
We are importing a large amount of content into Sitecore in en-GB. We are not creating en versions of this content. Authors are logging in with a default content language of en-GB. However, Sitecore Client Language is only available in base en. The actual name of these items is not very useful (it's an external system ID), so we want the authors to see the en-GB Display Name in Treelist, Multilist, etc. However since their Client Language is en, they do not.
I see two potential solutions:
Somehow modify or trick the controls into using the currently selected language of the content item when rendering list items. (Preferable)
Somehow duplicate the en Client Language so we can set the user's Client Language to en-GB.
Any ideas on how to execute either solution, or alternative approaches to solving the problem would be appreciated.
Does this get you started?
What if you implement the Language Fallback Item Provider and set en to be the fallback language for en-GB? That will then show the en display name in the case where it doesn't exist for en-GB.

How do you post content to a specific template position?

I purchased a template / theme from RocketTheme, but I can't figure out how to add content at a specific position.
The templates have "module positions" that collapse. I'd like to add some content at one of the module positions.
If I add articles, they seem to go into "mainbody". But I'd like to have content in other areas of the template.
How do I take some text, images, or other content, and get them to display in these other positions (i.e., TOP-A, or FEATURE-A, etc)?
I've tried this
Go to Extensions->Module Manager
Select "New", Select "Sections"
Under "Details", I select Position->Top-A
I give it a title.
Nothing seems to happen. I don't see anything new exposed in the admin UI, and I don't see a way to get any content into this newly defined section. What am I not understanding?
go to JED and look up html in module or content in module or content in component there are a bunch of them. http://extensions.joomla.org/search?q=module+content&start=20
Essentially
you create and save an article. Make sure it is saved to a section or category on your menu
open the module one of the paramaters will ask for the article id...decide which position and which pages you want it on and then publish.
You can also get modules that will take some or all of your articles in a category and then show them either as a slidedhow or one randomly when someone visits the page

How can I make Joomla 1.5 menus?

I'm making my own Joomla template, but when I check menu manager, it seems to be very confusing, because there are a lot of choices. I just need simple menu linking to my sites pages. So I need to know:
1) What kind of tag I need to insert to my template, so that it can show menus.
2) How can I link to pages on my site with that menu manager.
So, here's the five minute whirlwind tour of Joomla: You have Components, Modules, and Plugins.
Menu items link to components. This means that components are effectively "pages" in Joomla. So, you want a page to list a bunch of articles, for example? Create a menu item, and when you're asked to set it's "type" pick one the "articles" entries. Boom; you've just linked to a component.
Now, modules are odd bits and pieces of code that sit around components. Remember, the component is the "page" for all intents and purposes; modules are sidebar elements, "Related Articles" widgets and the like.
To create a new module, go to Extensions -> Module Manager and add one. Now, you can create a module that lists a batch of menu pages.
Lastly, you need someplace to put your modules on the page. The "template tag" if you're coming from Wordpres, is "". Drop that in your template on the sidebar, and change the name (the bit in parenthesis), to something like "sidebar".
Now, if you go back to the module manager, click your "Menu" widget, you should see a dropdown on the left where you can select the "position" the module should sit in. Select (or type in) "sidebar", and now that menu will be dropped into the page whereever you've placed your tag.
I would suggest you to go through the joomla 1.5 quick start guide, there you will find how to do that along with other stuff. This is the pdf file.
I'd agree with Sarfraz.
You could also check out the guides from Compass:
http://www.compassdesigns.net/joomla-tutorials/joomla-15-template-tutorial