replace or append new Item id to sef url

Discuss Search Engine Optimization in relation to Joomla! 2.5. This forum will also have discussions on SEF/SEO Joomla! 2.5 extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
lara_19800
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Sep 22, 2013 10:22 am

replace or append new Item id to sef url

Post by lara_19800 » Sun Sep 22, 2013 10:35 am

Hello,
I am enabling default joomla sef. I am using two templates and given login url in both the templates. If I entered wrong credentials template switching because of Item id. How can I fix this issue without modifying controller.php
Other wise I want to replace Item id using pluing and redirt again. but I don't know how to replace the existing Item id or append new Item id to sef url.

$app = JFactory::getApplication();
if (!$_REQUEST['Itemid'] && $app->getName() == 'site') {
$_REQUEST['Itemid'] = $_SESSION['Itemid'];
unset($_SESSION['Itemid']);
$app->redirect($_SERVER['REQUEST_URI']);
}

If I use the above code the page is always redicting(the condition is always true) and displaying error.

Please post the solution.
Please read the Forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

User avatar
PaulMore
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon Sep 23, 2013 4:13 pm
Location: Bournemouth

Re: replace or append new Item id to sef url

Post by PaulMore » Mon Sep 23, 2013 6:51 pm

What templates are you using?
Clearing out rubbish in the day and becoming a Joomla/WP design ninja at night.
www.rubbishclearancebournemouth.co.uk/about/


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 2.5”