VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: coruja on December 10, 2012, 07:13:08 AM

Title: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: coruja on December 10, 2012, 07:13:08 AM
Hello,

I am on I am using Joomla 2.5.8 with VirtueMart 2.0.14 (PHP 5.3.18)

I would link from a simple ad banner (Custom HTML module) from the Joomla site homepage to a VM Shop Category and retain the standard Joomla SEF URLs and also the correct breadcrumb path.

Please note - I only have one link to the shop in the main menu - I do not have the shop categories created as sub-menu items.

I am not using any SEF component apart from the Joomla built-in and it seems to be working great within the Joomla site and VM Shop. But when I link to a Category from anything else other than the site menu it loses the SEF URL and the breadcrumb is incorrect.

I have tried using a 'hidden' menu to get around this issue but this causes problems with 'aliases'
Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: bytelord on December 10, 2012, 08:31:29 AM
Hello,

I had similar issues with you and i am using the sef url inside custom html module, no link to menu items (hidden or not hidden) or not link with index.php?.....
Just create a link with sef, eg. virtuemart_alias/account/account-maintenance

Was my first post on the same a similar question: http://forum.virtuemart.net/index.php?topic=104139.msg346395#msg346395

Ragrds
Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: coruja on December 10, 2012, 12:07:31 PM
Thank you for the help.

As suggested I  have used 'http://www.../shop/category' and also just '/shop/category' as the links from my Custom HTML image banner but I am still getting non-SEF Urls on the resulting page and incorrect breadcrumbs.

May be I have not understood your explanation, could you give a little more detail?


Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: bytelord on December 10, 2012, 13:02:56 PM
Is working fine for me ... create just a new url with my editor under custom module and place the url like shop/category/sub-category
The produced link is sef and working fine.
Work fine also if you have sef disabled and place a NON sef url.

Regards
Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: coruja on December 11, 2012, 13:53:30 PM
Hello, I think I finally understand.

I created a Weblink (Components >> Weblinks)  and inserted the full SEF in there (http://www..../shop/category)

Then I inserted that Weblink as the link from my Custom HTML module banner.

This seems to work well, the breadcrumbs work  and the URL on the address bar is SEF.

Although the URL when I hover over the banner shows http://www.../weblinks/weblink/1-<weblink alias>

But this is better than where I was at earlier.

If I am doing this wrong or not in the way you had in mind please correct me.

Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: bytelord on December 11, 2012, 14:01:02 PM
Hello,

I just place the url inside the editor in custom html module ... like ... : shop/category/product or like shop/acount/maintenance ... that refers on my joomla menu items and the breadcrubs are working fine ...

Regards
Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: coruja on December 12, 2012, 04:38:37 AM
Thank you for helping me with this.

I see where we having having some differences, you have the URLs you are linking to from the Custom HTML module already set-up as Menu Items.  I don't have that.

I just have one link to the shop on my main top menu  - the rest of the shop categories are displayed in a VM Category Listing Module as another menu on the left.

So because the Category I am trying to link to does not exist as a Joomla Menu Item, the SEF and breadcrumbs 'break' if I try to link directly to it.

I don't think there is any other way to deal with my situation other than weblinks. This is just how Joomla works and VM doesn't 'expose' its URLs to Joomla.

Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: bytelord on December 12, 2012, 08:54:03 AM
Hello,

It's not something to expose ... Joomla using menu items for breadcrambs, etc ... else you could use the component link ... that what joomla do, but again you will have a long url. You could create a hidden menu under your shop menu and create there 1-2 links you gonna need.

Regards
Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: coruja on December 12, 2012, 09:59:35 AM
Hello,

The hidden menu option creates more issues with 'aliases' - because both 'shop' links will have the same root I will need to make the shop link of the hidden menu to be say 'shop1'. And this becomes a part of the URL throughout the users session!

If I use Menu Alias item it is even worse as it gets a date as a part of the url.

May be at this point I need to use a SEF extension?



Title: Re: Linking to Category from a Custom HTML(i.e. ad banner) module and keeping SEF
Post by: bytelord on December 12, 2012, 11:38:18 AM
No,

You have to use joomla alias for menu items right ;)

Regards