The Elearning Community • Web Pages - Home Tab - Page 2
Page 2 of 2

Re: Web Pages - Home Tab

Posted: Fri Nov 08, 2019 11:39 am
by marius
The sample above only have the <h1>DASHBOARD</h1> section in it. If I remove the h1 tags within the editor around DASHBOARD (so all standard text format) then the content displays fine.

Here is the sample from the Debugger view that does work. As you can see, the only difference is the removal of the second pair of h1 tags...

<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\">DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

Re: Web Pages - Home Tab

Posted: Fri Nov 08, 2019 11:49 am
by alfa24
Please provide a NOT WORKING sample of what you put in the TinyMce editor.

Re: Web Pages - Home Tab

Posted: Fri Nov 08, 2019 12:05 pm
by marius
This is a not working sample:
<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\"><h1>DASHBOARD</h1>
<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

tinyMCE source:
<h1>DASHBOARD</h1>
2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019


and this is a working sample:
<script type="text/javascript">
document.getElementById('tab_content').innerHTML = '<div id=\"tabhome_title\"><h1>Dashboard</h1></div><div id=\"tabhome_description\">DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019</div>';
</script>

tinyMCE source:
DASHBOARD<br />2020 BETTERBOND (realACHIEVERS) INCENTIVE TRIP (PHUKET)_BOOKING FORMS AND TRIP INFORMATION AVAILABLE HERE <br />(real)UPDATE 13 September 2019 <br />From the Desk of the MD &ndash; September 2019

Re: Web Pages - Home Tab

Posted: Fri Nov 08, 2019 12:38 pm
by alfa24
It's not related to the <h1> tag, but to the unescaped line break that TinyMCE adds everywhere.
To fix, change /appLms/view/home/_tabs_block.php from

Code: Select all

document.getElementById('tab_content').innerHTML = '<?php echo addslashes($_content); ?>';
to:

Code: Select all

document.getElementById('tab_content').innerHTML = '<?php echo trim(json_encode($_content),'"'); ?>';
Do the same in /appLms/view/home/_tabs.php

Re: Web Pages - Home Tab

Posted: Fri Nov 08, 2019 1:32 pm
by marius
Great - thank you very much... it is working.

Re: Web Pages - Home Tab

Posted: Mon Nov 11, 2019 6:44 am
by marius
Hi Jasmines. Is there a way to display or browse to the other pages, not marked as default but published, in the Home Tab section? Same goes for news - the news section on the right is great, but an alternative way to display the content (or links to old news articles) would be great...

Re: Web Pages - Home Tab

Posted: Mon Nov 11, 2019 6:53 am
by alfa24
Yes, but it would need custom development.

Re: Web Pages - Home Tab

Posted: Mon Nov 11, 2019 7:04 am
by marius
so at the moment no way to pass a get string to display the second or third web page in the home page section...

who can I contact for custom development?

Re: Web Pages - Home Tab

Posted: Mon Nov 11, 2019 7:44 am
by alfa24
You have my contacts below.