How to add logout button to my page in Joomla - joomla

I am using Joomla 2.5 inbuilt User registration form. I wanted to add registration,log-in,log-out menu to my page and i got the link of registration and Log-in by selecting user manager in menu item type. But how to get Log-out link ? to add my menu Please help me .Thanks in Advance .

You can always try to do that with the standard Joomla! module for login/logout.
To make this module, go to: Module Manager => New => Select type Login.

The code below worked for me in Joomla version 2.5
Log Out
The code below will work for Joomla 3.x
Logout

This should work for you in your template index.php
<?php if(JFactory::getUser()->guest): ?>
...do something...
<?php else: ?>
...do something...
<?php endif; ?>

Related

Customer login is not working in Magento

I have to upgrade Magento version 1.7 to 1.9. Its login is not working and there is no error in console or screen. Login popup at checkout page and social logins are working properly.
Add the below lines in Login template in your current theme:
Template Path: template\persistent\customer\form\login.phtml
Add this <?php echo $this->getBlockHtml('formkey'); ?> After Form Tag open

Magento 1.91 CE - Customers Cant login

Hi all our website is Caged.eu and we have customised a Template from pre 1.9. Magento allows customer to register but when they try to sign in using that login details login page doesnt respond, this also happens when they ask to resend password it send reset details but still doesnt work.
Oddly the click facebook link to sign up login does work which is another extension we are ready to release but after getting it this well done would hate to have to change template.
Im sure its something stupid but would really appreciate your help guys
In Magento 1.9 the forms are unable to store the data as formkey missing. Try to add the key then you can be able to sign in. Add <?php echo $this->getBlockHtml('formkey'); ?> this at line no 41 below <form> tag in app/design/frontend/[your theme package]/[your theme]/template/persistent/customer/form/login.phtml
And check whether you can update product quantity in cart, there also formkey is missing.
Copy base/default/template/customer and base/default/template/persistent to your theme/template
After you had added the line <?php echo $this->getBlockHtml('formkey'); ?>
Perhaps you need to to flush magneto cache from magento admin (System->Cache management), then you can try the frontend customer login again.
As already replied in magento.stackexchange you should edit
/app/design/frontend/default/template-name/template/persistent/customer/form/login.phtml
and inside the "login form" form, after the
<ul class="form-list">
you should insert
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
and this will solve your problem, as it did with mine.
Hope this helps
so be it - manemoi
Theodore

Adding magento menu to custom page

I have a magento custom page which is the homepage for our site - the guy before me however for some reason did not add the main menu to this page. How would I go about doing this?
The way i work with menus in Magento is:
First, i create a custom block, from the cms menu, in that block i add the li:
<li>Home</li>
Then in your template, edit the following file: app/desing/frontend/yourtheme/default/page/html/topmenu.phtml
you will see: <?php echo $_menu ?> before it add:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('yourblockname')->toHtml() ?>
And then you will be able to manage the menu option from your admin panel in your custom block.
I hope this help.

Advanced search result is not coming in magento on home page

i added advanced search option on my home page by placing this code in
/app/design/frontend/default/hellowired/template/page/2columns-right.phtml
<div>
<?php echo
$this->getLayout()->createBlock('catalogsearch/advanced_form')->setTemplate('catalogsearch/advanced/form.phtml')->toHtml()
?>
</div>
when press submit button then it giving me nothing. so result are not showing... please help
Check if you are getting the post url of the form as {{base-url}}/catalogsearch/advanced/result/

Joomla Modal not on every page

I have a older Joomla intallation which includes a modal feature, however I have noticed in the sourcecode that the related JS and CSS only load on the main index page - it's not being loaded on all other pages.
Is there a way to include this globally ?
Some advise would be greatly appreciated.
Figured it out - by adding:
<?php JHTML::_( 'behavior.modal' ); ?>

Resources