Topic-icon CB Registration Link

Active Subscriptions:

None
9 years 2 months ago #51471 by guero
CB Registration Link was created by guero
Hi,

I'm wondering how can I change the link which gets used within the SCLogin module. I'm using CB registration and the default link is index.php?option=com_comprofiler&task=registers

But I had to create a menu of type CB registration and now have the link index.php?option=com_comprofiler&Itemid=MY_ID&task=registers

I found a template override in module_sclogin/tmpl/login.php

echo $spacer . '<a ' . $registerClass . ' href="' . $helper->registerLink . '">' . JText::_('MOD_SCLOGIN_REGISTER_FOR_THIS_SITE') . '</a>';

but within the modal dialog it seems that you pulling this code somewhere else from outside the template ?!

echo '<div class="modal-body">' .
$modalContents .
'</div></div>';

Is it possible (without patching the core) to have the new CB registration link within the "Register"-Button inside the modal dialog?

Cheers
Frank
The topic has been locked.
Support Specialist
9 years 2 months ago #51488 by mel
Replied by mel on topic CB Registration Link

but within the modal dialog it seems that you pulling this code somewhere else from outside the template ?!

No, the code you're looking at for the $modalContents in the login.php file is displaying the contents of the joomlaLogin_horizontal.php or joomlaLogin_vertical.php files (depending on your SCLogin module parameters). There are two places that the Register link is used: next to the login link for launching the modal (which you are showing above) and from those joomlaLogin php files.

The registerLink for CB is being set in helper.php around line 191 with
$this->registerLink = JRoute::_("index.php?option=com_comprofiler&task=registers", false);

In the next version of SCLogin, we're adding the option to set the Registration link to a custom menu item. In the meantime, my suggestion would be to just append the Itemid to that line of code, like the following:
$this->registerLink = JRoute::_("index.php?option=com_comprofiler&task=registers", false).'&Itemid=MY_ID';

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #51493 by guero
Replied by guero on topic CB Registration Link
perfect. that works. thanks for pointing me to the right line...

Cheers
Frank
The topic has been locked.
Support Specialist
9 years 2 months ago #51500 by mel
Replied by mel on topic CB Registration Link
Glad that worked. Just keep in mind that when you update SCLogin next, you should probably either switch to the newer Custom Registration Link option or re-do this change in the file.

-Melissa
The topic has been locked.