How does joomla breadcrumbs work internally? - joomla

I've already gone thru: http://docs.joomla.org/How_to_add_breadcrumbs
and http://api.joomla.org/Joomla-Framework/Application/JPathway.html
but they don't help.
I have not found any more info in any books or internet.
My website has 1000's of pages generated thru script.
I want to generate breadcrumb navigation for the pages.
Google has refused me Adsense account due to this lack of navigation.

I'm not sure what else there is to explain. Joomla stores breadcrumbs in the $pathway object. A components adds items to that object using 2 parameters, name and link.
You call the object with:
$pathway =& $mainframe->getPathway();
Then you add to it with:
$pathway->addItem('name of item', 'link to item');
Then you add the breadcrumb module in the module manager. There is no more too it, what else would you need?

The breadcrumb is generally updated by the component that is being called.
$pathway =& $mainframe->getPathway();
And then
$pathway->addItem($membership->name, JRoute::_('index.php?option=com_rsmembership&view=membership&cid='.$membership->id.':'.JFilterOutput::stringURLSafe($membership->name) . "&Itemid=" . $itemid));
The above is an example from rsmembership
Essentially the breadcrumb is maintained (or stored) by Joomla, and added to by the components.

Related

Make a blog in magento and then assign that url in category

I am a newbie in Magento. Yesterday, my sir gave me a project to integrate `blog feature into Magento. After I googled out for few mins, I found Magento blogs extension by aheadworks. It installed perfectly well with my Magento website and I made a few posts. I also made the setting in the blog in which I added Route to blog option to "blogs". Rewrite feature is enabled in my Magento website. I made a new category and named it as Blogs. In added url key I added "blogs" and saved it. It is showing me an empty product list in my Blogs menu. I also tried to add the customer URL rewrite with the help of this site
It is still showing me the same result.
The correct path of accessing the blog is :- www.mydomain.com/blogs
In frontend it is showing me :- www.mydomains.com/blogs.html
Any help would be appreciated the most.
Thanks a lot.
In this case i created a new empty category with name 'Infothek' and url_key infothek.html, and then replaced the url to the one the ahead works blog is using. In this special case it is done for the AheadWorks blog, but you can of course use this with any other/custom blog too.
Register a new Observer via config.xml for the frontend:
<page_block_html_topmenu_gethtml_before>
<observers>
<add_blog_entry_to_topmenu>
<class>yourmodule/observer</class>
<method>changeTopMenu</method>
</add_blog_entry_to_topmenu>
</observers>
</page_block_html_topmenu_gethtml_before>
Implement the observer method
public function changeTopMenu($observer){
$event = $observer->getEvent();
$menu = $event->getMenu();
$menuCollection = $menu->getChildren();
foreach ($menuCollection as $menuItem) {
if ($menuItem->getData('name') == 'Infothek'){
$blogPath = Mage::getStoreConfig('blog/blog/route');
$menuItem->setUrl(str_replace('infothek.html', $blogPath,$menuItem->getUrl()));
}
}
}
Have fun!
you have to change url write for specific category.
As here i am giving your detail Documentation link
for url write to category
let me know if i can help you further.

Joomla! what is the link to the new page I just created?

I have been tasked with updating a Joomla site. I have been working with existing pages for a while, but now I had to create a new page.
I just created a new page using Joomla. But I can't find what the URL to that page is. Also, the pretty urls are enabled. But I don't know how to create a pretty url for the page I just created.
I even tried adding the id to /index.php?Itemid= in the url and doesn't work.
Seems like something like this would be self-explanatory, but I have been looking around in the options and the menus and googling for the answer and I can't find it anywhere.
As far as I know, you need to attach an article to a category to view it.
You can assign the article to a category. After that open an article from that category and replace the text after the last "/" in url with the alias of your article.
You can also assign the article to a category that is linked to a menu item. that way you will be able to see the article link in the menu.
You may later remove the article from the category.

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/

How can I add custom fields in cms edit page (Admin Panel)?

I am facing an issue in Magento. I want to add some custom fields to Magento Admin Panel CMS Edit Page. I got a page while searching where it describes adding a custom field in CMS page: http://blog.flexishore.com/2011/08/add-custom-field-to-cms-page/ .
I have followed every step in this, but I am still getting an error Call to undefined function getLoad().
Can anyone here explain me how to add custom fields in CMS page?
You can try this article (http://www.atwix.com/magento/adding-custom-attribute-to-a-cms-page/) as well, it's more simple, maybe it will be helpful for you.
Also don't forget about cache, I recommend you disable it when you are testing your own modules.

How to include javascript in Joomla virtuemart product details

I am actually customizing product details page with the help of http://virtuemart.net/documentation/Developer_Manual/Modifying_the_Layout.html this page. I need to include some external and internal JavaScript.But don't know were to add script.Please some one help me to do this.
To modify product details page . i just worked in following file components/com_virtuemart/themes/default/templates/product_details/flypage.tbl.php.
Virtuemart version is VirtueMart 1.1.9 stable
Joomla Version is Joomla! 1.5.15 Stable
Thanks In advance.
Based on your responses in the comments here is the answer:
//This line defines what JavaScript file you wish to add, change it as needed.
$myJsFile = JURI::Base() . 'templates/my_template_name/js/myJsFile.js';
//this line fetchs the jdocument object which is needed to add items to the head (amongst other things)
$document =& JFactory::getDocument(); //Drop the & if PHP5
//This line adds the previously setup JS url
$document->addScript($myJsFile);
If you want to add or something custom like IE conditional tags then see here for more info: http://docs.joomla.org/Adding_JavaScript_and_CSS_to_the_page on how to use this object.

Resources