Link loses menu context

NickOg 27 Nov, 2015
Hi
I am not sure that this is a CC5 or CF5 problem - in fact I doubt it!

I have a connection set up as shown [attachment=0]CC501.jpg[/attachment]. The buttons use this code

function showCoursesForConvener($row) {
//  fb($row, '$row At ' . __LINE__ . ' in ' . __FUNCTION__, FirePHP::INFO);
  ?>
  <div class='njjoclsPickConvenerRow'>
    <div class='njjoCoursename'><?php echo $row['mdlpickCourseForConvener']['vchName']; ?></div>
    <div class='njjoCourseButton'>
      <a  href='index.php?option=com_chronoconnectivity5&view=connection&ccname=AttendanceRegister&idProgram=<?php echo $row['mdlpickCourseForConvener']['id']; ?>'>
        <button type='button'>Attendance Register</button>
      </a>
    </div>
    <div class='njjoCourseButton'>
      <a  href='index.php?option=com_chronoconnectivity5&view=connection&ccname=ContactList&idProgram=<?php echo $row['mdlpickCourseForConvener']['id']; ?>'>
        <button type='button'>Contact List</button>
      </a>
    </div>
    <div class='njjoCourseButton'>
      <!--This needs to chnage to a form-->
      <a  href='index.php?option=com_chronoforms5&chronoform=MessageToClass&idProgram=<?php echo $row['mdlpickCourseForConvener']['id']; ?>'>
        <button type='button'>Message to Class</button>
      </a></div>
  </div>
  <?php
}

to load different CF5 forms.

My problem is that when following the link, I lose the menu 'context' - so.
[attachment=1]CC502.jpg[/attachment]

I use two menu 'contexts' depending on the logged in user id. I can manage which connection of form appears with which menu context by altering the menu assignment but since they don;t appear in a menu that I cannot do. Is there some way to overcome that?

Nick
GreyHead 27 Nov, 2015
HI Nick,

I suggest that you try assigning a 'hidden menu' item - that is one that isn't shown in a module anywhere - to the form name say message-to-class > index.php?option=com_chronoforms5&chronoform=MessageToClass then I think that you can use /message-to-class?idProgram=. . . in the <a> links. That should let you assign a menu context via the hidden menu as usual.

Bob
NickOg 27 Nov, 2015
Thanks Bob - I think I was on the right track but your info finishes it off. I think. Grandkids just arriving so will check it out later.😀
NickOg 29 Nov, 2015
Odd! That is the approach I have used in a Joomla 2/CF5 version of the site and it worked fine. NBG with Joomla 3/CF5/CC5 and that doesn't make sense. I will need to make up small test site and see if I can make it work there.

Nick
This topic is locked and no more replies can be posted.