How to remove ID from URL in Joomla 2.5 - joomla2.5

I am trying to remove id from url in Joomla2.5.8.
so I tried to set a reference to the below URL.
http://developernote.com/2012/05/how-to-remove-id-from-url-in-joomla-2-5/
I succeeded to remove id like below.
joomla/index.php/aaaa/bbbb.html ≫ joomla/index.php/aaaa/bbbb/105-cccc.html
But Only displays a ”blank page”.
I don't know what was wrong.
Could you give me some advice?
-program development environment-
・joomla!2.5.8
・SEO setting
Search Engine Friendly URL Yes
use URL rewriting No
Adds Suffix to URL Yes(add .html)
UNICODE Aliases No
・htaccess
no setting

The problem is that most likely the article you are trying to link to does not have a corresponding menu item associated with it. The problem comes from itemID inheritance. When you don't have a specific menu item for an article, it then inherits the itemID from its parent category. By commenting out the lines in router.php, you are stopping this from happening so the article will not have an itemID and cause a 404 error. You either need to create a menu item directly to the item (which would eliminated the itemID to begin with) or you need to create a menu item for the parent category. In either case, you can put it in a new menu that is not displayed in any modules.

Related

Custom Product.tpl with declination crash when select attribute and url change Prestashop 1.7

I have to create a custom page for only one product with declinations, so I have created "product-158.tpl" file with a new hook for a new module. (158 is the ID of the targeted product)
The page works well when the product is not to complicated to select, but if I need declinations as color or size, the new layout is replaced by classic product.tpl version and every customed things desapeared. The problem comes when the hidden "refresh" button is trigged and the "add-to-cart-or-refresh" form is submitted. If I erase the hidden button, I can select what I need to select, the cart recognise my order, I can buy the right declination, but If I click the "continue shopping" button, the same problem is displayed.
The problem comes when url change, maybe because of the new ID of the product, I really don't know. I'm searching from two month.
Thanks a lot to who will help me.
Why not park the base tpl, and call your hooks, and apply only changes that the product ID is 158?
Regards

Sitecore C# - move up / down an item in the same folder

The title says everything about my question
On sitecore 6.6 I have to order the items in a folder and I've been google it for few days with no success.
Can anybody help ? I've tried setting up __Sortorder field but I get an error saying that the property is readonly.
From what you wrote ("but I get an error saying that the property is readonly"), you haven't started editing the item before changing the Sort Order field value.
Simplest code is:
item.Editing.BeginEdit();
item[Sitecore.FieldIDs.Sortorder] = "25"; // or any other new value
item.Editing.EndEdit();
Editing.BeginEdit() and Editing.EndEdit() are required before and after every item change operation.
In older Sitecore versions devs used to use using (new Sitecore.Data.Items.EditContext(item)) instead, but from what I remember it's not recommended anymore.
Here is a sample article about Sitecore item editing: How to edit an Item in Code Behind
The __Sortorder template field has a "Read only" checkbox that you can use to allow the field to be written to.
You can use the Sorting buttons in the Home menu:
Select the item to move/sort
Open the Home menu
Use the Up/Down/First/Last buttons in the Sorting section
Or the keyboard shortcuts:
Up: (Ctrl+Shift+Alt+Up)
Down: (Ctrl+Shift+Alt+Down)

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...

How do I localize the names of menu items in 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.

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