I have a series of sequentially-numbered items in several named categories, which appear as numbered lists on this page. However, the added article ID in the URL is confusing the client.
I know that Joomla now adds the article ID to URLs, and that there is no easy way of removing it. The last time I needed to alter something I hacked the relevant template, but writing URLs is more involved.
I need this:
http://vision2020.org.uk/wishlist-for-retail/131-16-local-shops.html
to become:
http://vision2020.org.uk/wishlist-for-retail/16-local-shops.html
Has anyone tackled this issue without resorting to a (possibly outdated or bloated) plug-in?
Try use a SEF component like ACEsef or sh404sef which lets you customise each url. This will be far easier than you trying to change the com_content component in order to fix your urls.
Related
I needed a component for specific catalog, so I've paid for it to one freelancer. As it turned out, he's not very good at his job and I was given a component that works only partly. The biggest issues are router, breadcrumbs and json array for parent categories.
1. Router
currently it shows only domain.com/menuitem/viewname?id=X. There are 4 different views that looks like are not connected at all. in db, every view has its own table as it was requested, important fields are as follows:
Main Categories (root):
id, name, alias
General Categories:
id, name, alias, root_id
General Subcategories:
id, name, alias, cat_id
Detail:
id, name, alias, subcat_id[json array]
What I would like to do is to make SEF urls to look like this: domain.com/menuitem/root_alias/category_alias/subcategory_alias/detail_alias but I was told that it can't be done this way. I checked the SEF documentation on joomla portal but I can't figure it out (if it's even possible and if not, what would be a good SEO approach).
2. Breadcrumbs
Maybe it's caused by router and separate views, but they always show Home > Menuitem, but in mainmenu it's only /alias while in breadcrumbs it's /alias/mainview. I found how to add custom breadcrumbs into pathway on joomla portal, but I can't figure out how to get parent items. If there was a solution with SQL I could use it would be enough.
3. JSON array in db
I would like to change it to integer value and add new table subcategory_detail_xref so I can find items easily. Only way I can do it now is by using regular expression in SQL which I don't think is a good idea. I've checked tutorials on joomla portal but it looks just too complicated.
Any ideas, links to examples or tutorials that can help or solutions are highly appreciated.
PS: My website is running on latest Joomla (3.5) so if there are solutions only available for 3.5+ it's fine, I don't have any plans to downgrade
For router source code, you can refer to com_content, it's similar yours, in the 3.5 version, the router has to implement an interface.
There is no detail document at Joomla Developer site, com_content is exactly what you can learn to get it.
The breadcrumb you have to develop similar of router logic
Category table should extend the JNestedTable for multiple level tree structure
I have this SEO issues with Joomla, that Google Webmasters Tools catches as duplicate content, titles, description...
I have an article BABOONS with id 1, and is associated with sub-category Monkeys of parent category Animals. This parent and sub category are associated to menu items.
So, normally link to this article should be www.site.com/animals/monkeys/1-baboons
And here is the problem: If you try to access to this link trough component like this:
www.site.com/component/content/article/1-baboons
link still will be valid, and it will open this article but with no itemid associated! And, as its the same title, description, keywords and content, but different URL, google says that this is duplicate content.
I have tried many components for SEF url handling, but best case scenario was returning 404.
I have tried adding rel=canonical:
<link href="http://'.$_SERVER['SERVER_NAME'].JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)).'" rel="canonical" />
but with no luck, because it displays current url.
My question is, if there is any redirect technique or peace of code that will redirect component/content/article/1-baboons to its parent itemid /animals/monkeys/ that actually is associated with?
Did you try using the built in redirect component? It's not the ideal solution but it will work fine if it is just one. The link that you are showing is basically the permalink, guaranteed to be unique no matter what. The question is, what is it that is leading Google's spider to that link? Usually this happens when a module or plugin is not routing a url (i.e. wrapping in JRoute()). The core ones are generally good on this (though not unknown to find a mistake) but if you have anything that is generating links that you have installed that is probably where the issue is. You can look at any of the core articles modules and see what the code should look like.
I am to develop a Joomla 3.1 Template. The template should consist of a static header and footer, as well as multiple pages, all of which need their own styling. Further, the client would like to be able to add 'events' to a specific listings page. Customers should be able to book said events via a simple form.
Thanks to some really basic guides, I have the header and footer down, as well as some simple template options. However, I am now running into some problems;
How would I approach the content section? Ideally, a page would consist of multiple, editable sections. The client would be able to edit said sections in the backend without having to deal with or accidentally changing the layout or styling of the page itself. Since there are multiple pages, I obviously need different views/containers for each of them. Is this possible and if so, how?
Another problem is the documentation, which I found to be very lacking. Even google only got me so far (basic structure, index.php, templateDetails.xml and so forth). Are there any other resources I may have missed or do I really need to refer to other templates (most of which, obviously, aren't free) and use var_dump all the time?
Writing this, I just realized that I could theoretically build a template for every single page but ... that surely can't be right, right?
If someone could provide a basic outline or at least tell me how you personally would tackle a project like this, it'd be very much appreciated.
All the best
Edit;
I just found some video tutorials but since my bandwidth is limited, I cannot watch them. Please take this into account when writing an answer. Thanks.
I have only one word for you :
GANTRY :D
gantry-framework.org
Joomla revolves around menu items that point to components. For each menu item, you can assign modules to different positions within the template to create a unique page. You only need one template if you really understand how Joomla templating works.
Joomla has very good documentation here - http://docs.joomla.org/
Few things to remember -
Component - this is a type of content or app of sorts. A component will define what content is and how it is displayed. This can be anything from blog articles and categories to an event registration system to a message board or social network. Menu items generally will point to a view in a component.
Modules - these are used to display additional content around the component output. This can be a menu, or a login box, or a weather widget or anything else you can come up with. Modules can be assigned to or excluded from the various menu items on your site.
Plugin - plugins are used to change the final output on a site. They can be used to insert Youtube videos, or forms within content, or even to alter the meta tags on a page.
Understanding how extensions work is an important first step. Once you get how those work, learning how templates and template overrides work will give you most of what you need to know to build a basic Joomla site.
I have created a simple basic component in joomla named, careerform so I want to know that what will be its url? Will it be :
index.php/?option=com_careerform
or in sef it will be something like:
index.php/components/careerform
or it will be like this while using .htaccess
/careerform
Is it true or what are joomla default URLs with different settings? Please tell what you know.
thanks for your time.
While what you are asking to do is possible, it would be rather complicated to rename a component. As part of the renaming you would have to update the names of dozens if not hundreds of classes throughout every file of the component. Very likely to run into some bugs because of this.
The far easier prospect is to just avoid these types of urls in your site. Joomla will only fall back to that style of url if a menu item does not exist for the view. Because of that, you can make the url into this:
http://sitename.com/any-component-alias/
To do this, go into the menu manager and create a new menu item. If you don't want this as part of the main menu, you can create a new menu. (I typically have a menu called "Hidden" for menu items that I want aliased but don't actually link to throughout the site from a menu.) When creating the menu item, make sure the type matches the component and view. The alias will then be whatever is entered in the alias box just below the title.
The one issue you may run into with this is that a component may not have a menu type for a particular view. In that case, you you would need to add the necessary metadata.xml file to the view (which again would be much easier than renaming the component!). A good tutorial for that can be found here: http://docs.joomla.org/Adding_view_layout_configuration_parameters.
yes if SEF will be enabled then index.php/component/careerform will be used.
You can create custom URLs by developing a router for your component.
There is very good documentation for it here.
According to some SEO Practices having long URL is not good.
Magento uses layered navigation and when you have lots of attributes then the URL becomes very very long.
I can not put an URL here because the moderatos say its too localized.
I just wanted to know if this is possible to fix using any kind of code?
As I am not an expert on magento or php, I can not provide any code because I dont even know where should I start looking for to fix this.
Somebody suggested editing filter.phtml and put rel=nofollow.
Is it a good practice? Is it recommended that search engines dont crawl those pages that are related to layered navigation?
Another problem they have is that the title and description its always the same.
This is the technical solution:
Copy filter.phtml from app/design/frontend/base/default/template/catalog/layer to the equivalent directory in your site's theme.
In the anchor tag there (should be only one) add a rel="nofollow" attribute.
However, I would expect first that a SEO expert tell us if this should be done this way or not.
You might also consider using a rel="canonical" to point back to the main category that lists all of your products, that way more "juice" is sent back to that page for ranking.
More on that here: http://www.google.com/support/webmasters/bin/answer.py?answer=139394
Another solution would be to add the site to Google Webmaster Tools and then adjust how Google treats certain query string variables. By default, Google (and presumably others) examine pages with certain query string variables and try to determine if the page is different enough to rank separately or only rank the most relevant page.
Thank you very much for your post, for help I created a module that solves this error.
https://github.com/jruzafa/Devopensource_LayerCatSeo
Why don't you read YOAST Magento SEO article?
YOAST Magento SEO