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

TOPIC:

Passing variables between two layouts 19 Sep 2013 16:13 #11132

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Hi,

I've got a layout ('master' layout), each row contains a link to see details in another layout ('slave' layout).
I've modify the first view of the master layout with links to the slave layout with parameters :

<td style="text-align:right">
<?php echo JDom::_('html.fly', array(
'dataKey' => 'M09',
'dataObject' => $row,
'route' => array('view' => 'stat','layout' => 'smouth','cid[]' => $row->id,'m'=>'9')
));?>
</td>

The links are ok, but how/where can I edit the query for the 'slave' layout ?

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

Passing variables between two layouts 19 Sep 2013 18:52 #11133

  • etc
  • etc's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 132
  • Thank you received: 19
Hi,

why dont you do it in cook?

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

Passing variables between two layouts 20 Sep 2013 07:58 #11134

  • ewajoom
  • ewajoom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 2
Hi,

Because when I use cook, I don't see the possibility to add any parameter, I need 13 different links by line, one link for each column :

Object January February ....
1 link link
2....

Thanks

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

Passing variables between two layouts 20 Sep 2013 11:45 #11137

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
What do you want to do with 'm' (month) var ?

1. This var is available anywhere you want though JInput.
2. Then when the redirection occurs, you lost it from the new redirected url. There is a solution for that if you need to keep it in url. (add a follower in helper)
3. Then, you can output it in the slave page in a hidden field, in order to follow for the next page.

I know I do not explain how to do it, but it gives you the idea.

Hope it helps.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.081 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