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.139 seconds

This Component Generator is the REAL component generator. This tool is very easy to use and in a matter of minutes I was building a fully working extension. I was amazed with the end result... worth every cent...
Griiettner (JED)

         

Get Started