joomla how to create a custom link - joomla

I have set mod_rewrite in joomla so I can use link like http://www.mysite.com/home, http://www.mysite.com/contact where home and contact are link aliases.
All of this link are part of menu, but I'm intersted in create link that will be never displayed in any menu, how can do that?

There are a couple ways it can be done. The quick and easy way is to make a hidden menu just for creating links. Simply create a new menu and don't put it in a module. You can add all the menu items you want without having to display them anywhere and you get nice clean URLs.
You can also get the URL of an article that does not have a menu item, but it gets pretty long to use. The URL of an article will be something like -
domain.com/parent menu item alias/item alias.html
It will use the alias from what ever menu item it is inheriting the itemID from az part of the URL. I generally use the first method to avoid the long URLs.

Related

Joomla file system routing

A friend asked me to help him change something on his Joomla website, but I'm having a bit of difficulty understanding the file system and routing. From what I've read so far, looks like SEF urls are activated. Now if the sub directory is /index.php/standings, for instance, how can I figure out which templates/modules/etc are being used/loaded for that url?
note - I only have FTP access, but could get access to admin if necessary.
Now if the sub directory is /index.php/standings, for instance, how
can I figure out which templates/modules/etc are being used/loaded for
that url?
You'll need admin access.
For the template(s) sign-in to the backend then go to Extensions > Template Manager.
You'll see details of all the templates installed on the site and there will be one default template (marked with a star) for location 'Site' .
All pages on the site will use this template unless other templates have been assigned to specific pages. To find other assigned templates look for a check mark in the assigned column, click the template name, then under the the Menu Assignment tab look for which menu items the template has been assigned to.
For the modules/etc . From the backend go to Menus and locate the menu with the standings link. This listing will give you some information about type of link, e.g. 'Articles ยป Single Article' if the menu item is a article, or maybe it will be a component or one of the many other types of Joomla menu links.
Open the standings menu item, then click the module assignment tab and you'll see details of which modules are assigigned to this menu item.
Lastly, if the standings menu link is a single article, locate and open the article (from Content > Article Manager) and look for dynamic content which could come from a plugin, it will be enclosed by curly braces: eg {plugin-id}. The name will give you some indication of where to look.
Good luck!

How to attach ItemID to joomla footermenu

I am don't know joomla, but familiar with wordpress & PHP & wants to change some links in my clients existing project.
I have a menu which is a link like http://www.smarti.com.sa/index.php?option=com_content&view=article&id=6&Itemid=107 while calling it from top navigation menu.
developer has taken same link in footer but it redirects to
http://www.smarti.com.sa/index.php?option=com_content&view=article&id=6
Now i want ItemID in footer link also.
My Site URL is http://www.smarti.com.sa/
In that please Products > Microsoft.
Please give solution
As per your post, Your menu link for now is : http://www.smarti.com.sa/index.php?option=com_content&view=article&id=6 .
But, you want to use this like : http://www.smarti.com.sa/index.php/your_menu_name.
You can use aliases of menu links.
You can find aliases here, When you create/edit a menu link from backend of joomla you can see an alias associated with it. You can also find Aliases of menu link from grid screen of you menu type.
For showing Menu in front end you have to create CUSTOM HTML module, You can find how to create Custom HTML module here : http://vinaora.com/2012/09/how-to-add-custom-html-to-your-joomla-site-2/
Now, How can you find HTML to write in thst Custom HTML Module? So, for this you can go the page of front-end where that menu is visible. Now prss CTRL+U, you will see the HTML of that page. Here, you have to find the HTML of those menus.
In this HTML, you will find the links like : index.php?option=com_content&view=article&id=6
Now, you have to replace these links with index.php/alias_of_your_menu.
Now paste the edited HTML in Custom HTML module and save it by selecting a proper Position.
You can use joomla menu module in the footer.
Joomla also has the option to display second level menu items in a menu module.
To do this:
Set the Start Level to "1" and the End Level to "1".
That's all. Good Luck.

Create a childpage in Joomla without showing it in a menu

I would like to create a page in Joomla without showing it in a menu.
That would be easy when the URL could be from the root, e.g.
www.mysite.com/hiddenpage
I would just make a menu without module to show it and assign a menulink to that hidden menu.
However the url should be
www.mysite.com/parentpage/hiddenpage
So the page should be linked to another existing page as a childpage but without showing in the menu.
So far this seems not possible?
Am I overlooking a feature in Joomla which would allow me to simply deactivate visibility in the menu without preventing the page from being accessed from the internet?
Or perhaps is it possible to edit or override a core component to force Joomla to allow this behaviour?
UPDATE:
Too much thinking in one direction...
The solution to do this is to edit the menu-item > linktype > css give it class "hide" (integrated bootstrap class) to just block visibility in the menu...
It's possible but a litle bit tricky. Try these steps :
Create a new two articles, name it as you wish (for example Article A and Article B )
Create a new menu group (from your administrator page go to : Menus > Menu Manager > Add new menu, name it as 'Hidden Menu'
Create a new Single Article menu item (under the 'Hidden Menu'), choose 'Article A' as as the article source and type 'parentpage' in the Menu Title field
Create a new Single Article menu item (under the 'Hidden Menu'), choose 'Article B' as the article source, choose 'parentpage' menu as the parent item and type 'hiddenpage' in the Menu Title field.
Now both of urls www.mysite.com/parentpage and www.mysite.com/parentpage/hiddenpage should be accessible now
As others have mentioned you can find extensions to modify URLs or hide the menu items using CSS, but these can require quite a bit of work especially if this is a one-off or once in a while situation.
However, there is one way to do this with Joomla as-is and will work with any type of menu items, not just articles. These instructions assume you already have a 'hidden' menu setup.
In a hidden menu, create menu items (or move them if they already exist) for parentpage and hiddenpage.
Set parentpage as the 'Parent Item' option in the hiddenpage menu item. Basically, create the page/subpage structure you'd like to see in the URL.
On your visible menu, create a 'Menu item Alias' (under 'System Links') menu item. Set the 'Menu item' option to the parentpage (listed under the hidden menu).
Enjoy. Parentpage is a visible menu item. hiddenpage is available at www.mysite.com/parentpage/hiddenpage
-Nick
No this is not possible with Joomla.
There are several options for you to achieve the same result, I list them in order of ease.
Use joomla redirect component. Simply tell the user to surf to the url he wants, he will then find it in the administrator - components - redirect, where she can insert the non-sef url.
Tell them to use a different prefix: i.e. create a hidden menu where they will add the direct links;
Additionally, in order to remove the id from the url you can:
Install simplecustomrouter extension, it should do the job out of the box but some coding may be required on your part in order for it to work properly; extremely lightweight.
Go for a blasoned SEF extension such as sh440sef, this will add some overhead and may require a lot of work in configuration.
FOR JOOMLA 3.X:
While editing the childmenu just set (under "Linktype") "Display in menu" to "no"... it's simple like that!
Here's a reference to the joomla.docs site
https://docs.joomla.org/images/6/6f/Help-3x-menus-menu-manager-new-menu-item-link-type-en.png
if link is broken just search for "edit menu linktype joomla 3" in future.
I'm glad I can return the many saved searchtime to y'all stackpeople. Go on Community!

Prevent "direct access" to menu items but keep them accessible when embedded in articles

I've been building a Joomla website for a couple of weeks now and having started with virtually zero Joomla and PHP knowledge I have to say I've been kind of fumbling my way through all of this. Anyway, I'm having a small "problem" and hope you guys can help me sort it out:
I'm using Plugin Include Component to embed content inside articles. Naturally, this content is associated with menu items. The thing is, I want these menu items to be accessible only through the articles in which they are embedded. This means that I want to somehow restrict direct access to the menu items, but still allowing users to see their content inside the articles.
For the sake of comprehension I'll try to be more graphic:
I have a Category Blog associated with menu item A.
By means of the plugin I mentioned above, I have A embedded inside article B. So far so good! When B is displayed, the category blog in A is also shown as a part of it. But I don't want users to be able to type B's url into the browser and access it directly, because it's detrimental to my site's structure and navigation. Obviously, unpublishing the menu item wouldn't help at all because it would cease to be visible inside the article.
My apologies if I didn't make myself clear. Any hints or tips?
Ok, as far as not being able to directly access the menu items for item A, just publish the menu item in a new menu that is not added to any module position. This way there are no direct links that the user can access through the front end.
As far as a user TYPING in the url for item A, you are out of luck. There is no way to prevent that. Once you have created the menu item, there is a URL which necessarily must be accessible. Using the hidden menu trick, the user would have to know that the URL exists to be able to get there, but it will be there if they know it. The way you are putting the site together the user shouldn't be to see the url so they will likely never type it in, but it would be possible.

YooTheme Zoo Application Blog Front Page

I am using YooTheme's ZOO Blog application on my front page. I have two things I'd like to acheive;
When clicking on an article title, you are taken to a page where you
have the article in full view, including any read-more content you
may/may not have. When taken to this page, you still have all modules
which are assigned to the 'home' menu item. Unfortunately, in order
for the application, 'Blog' to show on the front page - it must be
assigned to the 'home' menu item.
I'd preferably like the full article page just to have the menu module at the top, and perhaps any modules I do actually 'enable'.
A strange one - I'd like to have no pagination at the bottom of my
front page. I'd simply like to encourage users to go to a separate
page that lists all of the news.
I hope someone can help!
I'd utilise the 'fantastic' community that YooTheme holds - but unfortunately, after 3 months (being the lowest tier when you buy a product) any and -all- support stops. This includes the ticketing system which is mainly community-help based.
If need be, I can provide screen shots.
You can edit the full and any layout by clicking to the icon in zoo administrator panel. There you can edit every element in the link which is under your app type name! Next to the "Default" or your template there are links for full, teaser, feed etc. Full is for the full view of the item and teaser is for the category/front page view! In Yootheme's website you can find a comprehensive documentation about zoo also! Let me know if you need anything else
I found the answers to this problem. (I'm not native english speaker, but I hope you'll understand)
First method - sh404sef, I don't know whether it's a feature or a bug in that component, but that what you need to do:
Unpublish your default homepage menu item(zoo category for example) to wich there were assigned modules that you dont need to be shown, then create and make it Default Page(star sign) new menu item(or use existing one), and assign to it the modules that you want to appear in the full item view(I'm using product not a blog zoo app) or article full view when you click link from homepage and opens zoo item page or zoo category page.
In joomla Globa Configuration turn on - Use URL rewriting, then in sh404sef Control Panel turn on - Enable URL optimization and Rewriting mode with .htaccess . Errase all the url links in sh404SEF: URL manager(if any exist), we need it (sh404SEF) to create new links.
Now when you open new default home page with modules you need to be shown in the zoo item full view, you start to going on ALL the zoo links you wish to open then with that quantity of modules. sh404sef creates SEF link in it backend (in URL manager). And that links will open with exactly with that quantity of modules with zoo.
Now you can publish back again your previos homepage and make it default page. And there will be modules that you want on homepage, but because of links that sh404sef created when you were clicking, the zoo items or article links will open with different modules that we asigned to our second default page you use to create those links. For that purpose I commonly use existing menu item where will be another set of modules not like in the homepage. When you have new link on site you have to partially repeat that. You have to go on that link first time from the page where quantity of modules suits you (and to be on the safe side make that page your default page for that time)
Second method - JoomlaXTC Zoo Item Wall, its a module you don't have to make menu item to show zoo items on a homepage. But, I didn't tried it myself I only read about it.

Resources