Page 4 of 4

Re: Only an idea

Posted: Sat Oct 28, 2017 3:59 pm
by Tata
INstead of refactoring the template I tried to hide the "welcome screen" with

Code: Select all

<div id="welcome_screen" class="<?php if(!$adm || !$edit) {echo $intro;} else {echo 'intro_hide';}?>">
Having "intro_hide" set to display:none in stylesheet, I assumed:
1. if the page is not in admin/edit modus, the welcome screen is on (this works fine, logging in, the newsboxes disappear).
2. there $intro = "intro" defined on the first (empty) page will show the 4 newsboxes and
3. any other page without defined $intro will hide them. But this doesn't work. The newsboxes are always there.

Re: Only an idea

Posted: Sat Oct 28, 2017 4:33 pm
by cmb
Tata wrote:INstead of refactoring the template I tried to hide the "welcome screen" with

Code: Select all

<div id="welcome_screen" class="<?php if(!$adm || !$edit) {echo $intro;} else {echo 'intro_hide';}?>">
Having "intro_hide" set to display:none in stylesheet, I assumed:
1. if the page is not in admin/edit modus, the welcome screen is on (this works fine, logging in, the newsboxes disappear).
2. there $intro = "intro" defined on the first (empty) page will show the 4 newsboxes and
3. any other page without defined $intro will hide them. But this doesn't work. The newsboxes are always there.
This can't work, since there is no query regarding $intro. Furthermore, why hiding the newsboxes instead of not emitting them in the first place? So, I think a better solution would be to use a variation of Newsbox on the start page only; something like:

Code: Select all

<?php if (!(XH_ADM && $edit) && $s == 0):?>
<!-- emit the newsboxes -->
<?php endif?>

Re: Only an idea

Posted: Sat Oct 28, 2017 5:04 pm
by Tata
Simply genie!
It works excellently with standard template. With onepage template the first (empty screen is there).
Mod is uploaded.
I see, however, that with the same content only one of the templates (standard/onepage) can be used. Internal links made under one template are wrongly interpreted under the onepage template. But that's no problem. Only one of them will finally be used.