Ha ha... thanks I never even noticed that they were modal links - I never clicked on them....
I have got it to work, sort of...
so using the above example I have done this;
I have added this to my standard post module;
Code: Select all
public function display_input() {
$p_modal = info_pages::get_page([
'p.slug' => 'privacy',
'pd.languages_id' => $_SESSION['languages_id'],
]);
$modal = [
'name' => 'PModal',
'title' => $p_modal['pages_title'],
'text' => $p_modal['pages_text'],
'close_button' => MODULE_SHIPPING_POSTSTANDARD_CLOSE,
];
ob_start();
include Guarantor::ensure_global('Template')->map('modal.php', 'component');
$GLOBALS['Template']->add_block(ob_get_clean(), 'footer_scripts');
}
and changed by text file as follows
Code: Select all
const MODULE_SHIPPING_POSTSTANDARD_TEXT_TITLE = 'Standard Post <a href="#" role="button" class="card-link ml-0 border-bottom border-primary" data-toggle="modal" data-target="#PModal"><i class="fas fa-question-circle">';
this obviously opens the privacy policy page - so I want it to oper another page....
I created a new page in tools -> info pages
I named is: Standard Post - with the slug "standard" and change the code as follows;
Code: Select all
public function display_input() {
$sp_modal = info_pages::get_page([
'p.slug' => 'standard',
'pd.languages_id' => $_SESSION['languages_id'],
]);
$modal = [
'name' => 'SPModal',
'title' => $sp_modal['pages_title'],
'text' => $sp_modal['pages_text'],
'close_button' => MODULE_SHIPPING_POSTSTANDARD_CLOSE,
];
ob_start();
include Guarantor::ensure_global('Template')->map('modal.php', 'component');
$GLOBALS['Template']->add_block(ob_get_clean(), 'footer_scripts');
}
Code: Select all
const MODULE_SHIPPING_POSTSTANDARD_TEXT_TITLE = 'Standard Post <a href="#" role="button" class="card-link ml-0 border-bottom border-primary" data-toggle="modal" data-target="#SPModal"><i class="fas fa-question-circle">';
after doing this, nothing opens .... so I am obviously missing a step or 2, any idea what I have to do?