views:

909

answers:

5

Hi

In joomla, I need to assign specially designed templates for both "User Edit" (Where user edits their details)

/index.php?option=com_user&view=user&task=edit

and "Search Results"

I can't for the life of me work out how Joomla is selecting templates now. Certainly ItemID's aren't obvious and template overrides aren't giving any clues.

Currently Search is defaulting to the site 'home page' template, and the user edit to the 'default' template.

I don't think it should matter but we are using jfusion.

Can anyone point me in the write direction

Thanks Stephen

+1  A: 

Templates in Joomla are assigned to different pages (via menu items) under Extensions > Template manager. The default template (with a star) is assigned to all otherwise unassigned pages. For the other templates, click the name and choose the pagesto assign it to.

If you don't have menu items assigned to the pages you mentioned, you can create a new menu called "hidden menu", make the menu items there, then link to those menus.

I think you're getting terminology mixed up though. "Template overrides" are files that reside in each template that override the default content output. There's only one set per template - if you want multiple template overrides you need multiple templates.

DisgruntledGoat
Thanks for taking the time to answer.Unfortunately that hasn't worked for meI had already tried assigning a template to a search menu option, but it is not being picked up when search results are being displayed from the module. In terms of the template overides, you are correct for what they are, my reference however to them was about whether the module showed what itemid was used. Unfortunately they don't. I would have therefore expected the default template to be used, but instead my results are outputting an ItemID of 1 so the home page is being displayed.ThanksStephen
Stephen Baugh
Hmmm... I'm not sure what the problem might be. If you haven't already, try assigning a menu item to search results or a search page. Templates should inherit from a parent/section.
DisgruntledGoat
A: 

Lets try ::

/index.php?option=com_user&view=user&task=edit&template=template-name

parameter template comes from /includes/application.php:311

// Allows for overriding the active

template from the request $template = JRequest::getCmd('template', $template);

Hope it will work :-)

joomla-bali
A: 

follow the instructions on this website. this link did it for me.

http://www.johncrumpton.com/joomla-search-results-homepage-template/

A: 

How can I incorporate template parameter to the URL? - do I need to override the module to use it?

sigman
A: 

template over rides are stored in the templates folder. so if you are using teh template called "beez" (comes stock standard) the template overides are in : templates/beez/html/

they are then stored under the module or component name. eg the article layout for com_content is stored in: templates/beez/html/com_content/article/default.php the template is usualy called default.php, but each component and module can have a few extra templates that they use as well as deafult.php

Now you are asking to change the "user" view for com_user when editing

I think that location is: templates/beez/html/com_user/user/form.php

if you ever want to find the origanal template which is to be overridden in this case: template that would be in: /components/com_user/views/user/tmpl/form.php

so in general templates/templatename/component_name/view_name/template_filename.php

Bingy