Page 1 of 1
Homebutton in php_retrieve_url_of_record
Posted: Mon Mar 08, 2021 1:34 pm
by getNo
Hello,
i want to use the
Code of yours, Kevin.
But there is no Home-Button.
My Landingpage is:
Startpage
Form ID: 602be8bdabda21b
Form Code: Startpage
Thanks for the good work and the fast replies so far.
Re: Homebutton in php_retrieve_url_of_record
Posted: Mon Mar 08, 2021 2:29 pm
by kev1n
Hi,
This function is already included in v4.5.
You can just call
The arguments are optional:
Code: Select all
function nuGetRecordURL($origin = '', $subFolder = '', $homepageId = '')
Re: Homebutton in php_retrieve_url_of_record
Posted: Mon Mar 08, 2021 3:11 pm
by getNo
There is something wrong.
Code: Select all
nuDebug( nuGetRecordURL($origin='602e230f33e2162', $subFolder = '', $homepageId = 'Startpage'));
Code: Select all
[0] : 602e230f33e2162/index.php?f=xx&r=#RECORD_ID#&h=Startpage
With the older code im getting a well formed url:
https://xxxxx.de/index.php?f=602e230f33 ... =Startpage
But ether with h=Formcode or h=Form ID i didnt get a Homebutton in the Navigationbar.
Re: Homebutton in php_retrieve_url_of_record
Posted: Wed Mar 10, 2021 8:47 am
by getNo
Hello Kevin,
is there a way to get the homebutton working in the url?
Re: Homebutton in php_retrieve_url_of_record
Posted: Thu Mar 11, 2021 1:09 pm
by kev1n
Pass the Form ID instead of the string "Startpage"
Re: Homebutton in php_retrieve_url_of_record
Posted: Thu Mar 11, 2021 1:45 pm
by getNo
ok, i did.
But there is still something wrong.
If im logged in new for the link i get a navigation but the "home-button" links to the same page.
2.png
If im already logged in, theres no navigation
1.png
But if i use a new blank "incognito-Tab" without any cookies i get this
3.png
The
HOME-Link directs to the correct Startpage. Also some bugs in the displayed forms.
Re: Homebutton in php_retrieve_url_of_record
Posted: Thu Mar 11, 2021 2:15 pm
by kev1n
Try this:
Replace
Code: Select all
if(window.nuLoginH != ''){
$('#nuBreadcrumb0')
.html(nuTranslate('Home'))
.attr('onclick', '')
.attr('onclick', 'nuForm("' + window.nuLoginH + '", -1, "", "", 1);');
window.nuLoginH = ''
}
with
Code: Select all
if(window.nuLoginH != ''){
var bc = $('#nuBreadcrumb0').length > 0 ? $('#nuBreadcrumb0') : $('#nuHomeGap');
bc
.html(nuTranslate('Home'))
.attr('onclick', '')
.attr('onclick', 'nuForm("' + window.nuLoginH + '", -1, "", "", 1);');
window.nuLoginH = ''
}
https://github.com/nuBuilder/nuBuilder- ... rm.js#L195
Re: Homebutton in php_retrieve_url_of_record
Posted: Thu Mar 11, 2021 8:13 pm
by getNo
Seems working. Thx for you help.
I used the code below, to get the familiar home button.
Code: Select all
if(window.nuLoginH != ''){
var bc = $('#nuBreadcrumb0').length > 0 ? $('#nuBreadcrumb0') : $('#nuHomeGap');
bc
.html('<i class="fa fa-home" style="font-size:20px;padding:0px 5px 0px 0px"></i>')
.attr('title', nuTranslate('Home'))
.attr('onclick', '')
.attr('onclick', 'nuForm("' + window.nuLoginH + '", -1, "", "", 1);');
window.nuLoginH = ''
}
Re: Homebutton in php_retrieve_url_of_record
Posted: Fri Mar 12, 2021 1:11 pm
by kev1n
Thanks, updated on Github.