Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[CLOSED] Item layout entry point 24 Jan 2012 13:53 #1039

  • M4d3L
  • M4d3L's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 45
  • Thank you received: 7
Last week, I try to create an application. it was working on frontend (form with some basic field).

This week, if I try it into sandbox or download it and install it on my joomla 1.5 website, I can't see anymore the form.

anything change from last week?

Please Log in or Create an account to join the conversation.

Re: Generation problem? 24 Jan 2012 14:16 #1040

  • M4d3L
  • M4d3L's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 45
  • Thank you received: 7
I think I found the problem.

When generating the default view,

the default layout case is missing.

ex:
function display($tpl = null)
	{
		$layout = $this->getLayout();
		print $layout;
		switch($layout)
		{
			case 'enregistrement':

				$fct = "display_" . $layout;
				$this->$fct($tpl);
				break;
		}

	}

here is the fixed code :
function display($tpl = null)
	{

		$layout = $this->getLayout();
		print $layout;
		switch($layout)
		{
			case 'enregistrement':

				$fct = "display_" . $layout;
				$this->$fct($tpl);
				break;
			default:
			$fct = "display_enregistrement";
				$this->$fct($tpl);
				break;
		}

	}

but maybe add the default view/layout in the entry file of the component.

Please Log in or Create an account to join the conversation.

Last edit: by M4d3L.

Re: Generation problem? 24 Jan 2012 18:08 #1057

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I think you didn't defined any entry point.

Maybe it was setted up, and you deleted the concerned layout defined as 'Entry point'.

But, tell me ...

From where do you call this layout ?

Which menu ?
- Admin menu ?
- Sandbox menu ?
- Task (New-Edit) ?

Because the layout alias MUST always be present in the url for item layout.

Except for the task toolbar, and you should set it in your controller, her a basic example :
function new_()
{
	if (!$this->can('core.create', JText::_("DEMO120_TASK_NEW")))
		return;

	$vars = array();

	JRequest::setVar( 'cid', 0 );
	JRequest::setVar( 'view'  , 'client');
	JRequest::setVar( 'layout', 'client' );    // <-  HERE 

	$this->setRedirect(Demo120Helper::urlRequest($vars));
}

function edit()
{
	if (!$this->can('core.edit', JText::_("DEMO120_TASK_EDIT")))
		return;

	$vars = array();
	JRequest::setVar( 'view'  , 'client');
	JRequest::setVar( 'layout', 'client' );    // <-  HERE 

	$this->setRedirect(Demo120Helper::urlRequest($vars));
}
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Generation problem? 24 Jan 2012 18:17 #1060

  • M4d3L
  • M4d3L's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 45
  • Thank you received: 7
exemple. if I go into my sandbox menu. I see ... nothing... no form, no submenu.

in my project I only have one item on frontent. no collection. and the item is a form.

Please Log in or Create an account to join the conversation.

Re: Generation problem? 08 Mar 2012 18:11 #1518

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Is this issue still present ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Generation problem? 08 Mar 2012 18:33 #1519

  • M4d3L
  • M4d3L's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 45
  • Thank you received: 7
I think so.

Please Log in or Create an account to join the conversation.

Re: Generation problem? 08 Mar 2012 18:42 #1520

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Wich Project / Table / Layout ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: Generation problem? 08 Mar 2012 19:10 #1521

  • M4d3L
  • M4d3L's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 45
  • Thank you received: 7
nvm I mean I think its fixed

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.097 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started