Joomla External Link - - joomla

I am using the external link type menu items within Joomla - the reason is I need to link direct to an anchor on another page from the menu.
I have around 10-15 links, all work as expected except 2.
in my external URL box I have something like this:
"index.php?option=com_content&view=article&id=10&Itemid=207#SystemIntegration"
id - is the article id
Itemid - is the menu item I want to be active
hashtag - is my anchor link
PROBLEM:
On the 2 that are not working it seems to go to url with this "http://www.website.com/component/content/?Itemid=207#SystemIntegration" instead of "http://www.website.com/services/digital-solutions/SystemIntegration#SystemIntegration" as expected
has anyone else had this issue? I have a feeling its connected to the SEF urls being on.
Joomla 3.5.0 version

Step1. Create a Hidden Menu from Joomla admin==>Menus==>Manage==>add
new menu
Step2. Select a Hidden Menu ==> add a new menu item==>Menu Item
Type==>Article==>single article==>your article id==>save
Step3. Site load this url(take copy)
Step4. Create a new menu from external url Pate the previous url
(include #)

Nothing I tried worked reliably - so I got round it by making each item go to the single article, then using a spare field to store the name of anchor. Then within some custom JS code I checked if the field was set and automatically scrolled the page to it if it was - works better than the joomla standard anyway and is more reliable

Related

Hide component name from urls in joomla

I need to hide component name in joomla urls.
I have also applied configuration for SEO urls in administrator.
But still it is displaying component name in urls
So please suggest me appropriate solution for hiding component name in urls
You need to create a menu item (or tree of items) to the component. The alias you give the menu will appear in the URL.

Add a module to a component , but not every page of the component

i'm working on a joomla 1.5 for a university project (when it started 2.5 wasn't out :D). What i'm trying to do is to assign a module to my custom component , but not every page of it.
The 2 different pages of my component is a page that shows every product , but the other one needs an id to work. In order to assign the module just to a page i think i need to assign every page my component has to a menu item.
But my problem is that i don't know how to assign my page that shows a specific product the variable id to make it work.
The Joorthodox way, i guess, would be to control the module availability from the module manager in administator page, where you can assign it to certain pages/menu items only.
Thus summarizing, create a menu item type for that page assign it to a menu item which in turn will be your module control switch for that page.
Another approach could be a control directly to the joomla module renderer. An example can be found here: joomla-is-there-a-module-render-plugin-event
One method would be to set the module to be hidden on that page using CSS.
Go to views/view_name/tmpl/default.php and within the tags at the top, add the following code in:
$doc = JFactory::getDocument();
$doc->addStyleDeclaration(" #element_id { display: none; } ");
You will need to inspect the module using a tool such as Firebug, Chrome Dev Tools or another tool depending on which browser you're using, and change element_id to whatever suits your needs.
Hope this helps
Just use Advanced Module Manager and assign your module by URL's not just by the menu link, it works for me to hide and show a module inside the different pages of the same component

Why is Joomla 1.5 creating different URLs for the same articles on different pages?

I'm trying to understand the way Joomla (1.5) creates article URLs.
I created a module to display news. The module displays all the news, with correct URLs on the homepage mysite/component/content/article/xxxxxxxx.
I created a module to display the last article on the homepage and a button, see all news, linking to a menu item displaying a page with all the articles. The url is: mysite/news.
The problem is the URLs to the article are generated incorrectly as mysite/news/xxxxxxxx and they give a 404. How can I get the URLs to be the same as on the homepage?
Update: The new URL doesn't give a 404, it points to the same page as the menu, I mean mysite/news/ is the same as mysite/news/xxxxxxxx, it shows the list of all the articles and not the article itself
To create proper SEF URLs, two steps are needed:
Be sure to have a menu entry for each article in the list. You don't have to display that menu, it just has to exist. The menu entry's alias is used to build the SEF URL.
When creating links to such an article, be sure to include the parameter Itemid=n in the URL, with n being the id of the menu item. In article texts, use this structure:
index.php?option=com_content&view=article&id=23&Itemid=125
Joomla! will convert that into a SEF URL automatically, and it will still work, when you for some reason turn SEF off.
If you generate links in a module, the URL is not converted automatically. You have to call JRoute::_() for that:
echo JRoute::_('index.php?option=com_content&view=article&id=23&Itemid=125');

only display Virtuemart products based on registered login

We are trying to setup a simple BTB site to support our retailers (somewhere they can download product text/images and corporate branding). We are using Joomla 1.5.2 and Virtuemart 1.1.9
We want it to be completely secure (unregistered viewers - and competition - just see simple intro page, and login with option to register). Not any content at all.
And we also also want to use VM registration for registering new users.
I set up the secure access for categories/products using Joomla menu items pointed to virtuemart categories, and set the menu item access to "registered". Worked perfect, user not logged in, don't see anything but splash page. Logged in, all of the product categories were available via the menu items.
But we just realized this messes up user registration. We want to use Virtuemarts user reg so we don't have to gather all of that data (address info, etc.) and come back and enter by hand.
Apparantly, with the virtuemart menu items set to "registered" access, the user gets redirected to joomla's registration page(which doesn't gather the data we need into Virtuemart). I've pasted a valid VM registration url everywhere I could find in the backend login files (com_user and mod_user), but no luck (didn't think that would work, im a beginner).
Anyone know if there is a workaround? Or a better way to do this?
Thank you.
I can you tell with absolute certainty that you'll need to make a minor adjustment in the VM code if you want to do this. The hurdle is that VM uses the same menu Item ID as it's default throughout the script, so even if you create a different menu item for the registration, it's always going to fall back to the first one that you had.
The only way around this is a small hack in the VM function that always forces this to happen. Put the below code at the very beginning of function getShopItemid() located in ps_session.php somewhere around line 459. Leave all the existing code in place, but this needs to run before that does.
/*Hack For multiple VM menu itemids, if there is a page specified, find THAT Itemid */
global $page;
if($_REQUEST['Itemid']) {
$_REQUEST['shopItemid'] = $_REQUEST['Itemid'];
} elseif($page) {
$db_hack = new ps_DB;
$q = "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart' AND published=1 AND params like '%page=".$page."%'";
$db_hack->query( $q );
if( $db_hack->next_record() ) {
$_REQUEST['shopItemid'] = $db_hack->f("id");
}
}
Once this is in place, you'll need to have a Joomla menu item that includes at least this:
option=com_virtuemart&page=shop.registration
With that menu item in the database, the above code will find the menu item for that page, and use that one instead of the default VM method. The Joomla security will trigger as you expect because it has the correct menu item.

Joomla: homepage url

Joomla requires that home page was linked with some component.
So, if i link menu item of homepage to some article, i get a url like:
"index.php?option=com_content&view=article&id=68&Itemid=464" on frontend.
How to link homepage to "/" ?
UPD:
Joomla verion 1.7
Maybe, i not accurately explained.
I link home menu item with some article.
When i go to www.mysite.com - all fine, choosen article is shown on homepage.
But then the home menu item on frontend became "index.php?option=com_content&view=article&id=68&Itemid=464", not just '/'
You must use the default Joomla format for setting something as the "home" page. in 2.5 (since you failed to tell us which version you're running) you do this by using 'featured articles'. By default, any featured article is displayed on the homepage.
In older versions (1.5) you must mark it to display on the 'front page'
In doing that when you go to http://www.yoursite.com/ - you will see the articles listed as 'featured' or 'front page' articles. You can adjust how they display by using the front page or featured article manager.
I apologize if I've misunderstood your question - but hope this helps. It also looks like you don't have SEF URL's turned on - you may want to look into that. Regardless your front page will display without any additional URL stuff if you use the methods outlined above.
In your menu manager (backend), create a new entry for 1 article and select it in the list. After that, just define this new menu entry as default (or homepage).
This article will be the default homepage of your website and will be accessible via www.yoursite.com/

Resources