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

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started