Page 1 of 1

CJ Pages

Posted: Tue Mar 15, 2016 9:57 pm
by erosmembers
If I define two CJ pages fpr 2 layouts:
/var/home/user/domain/www/scj/tube/index.php
/var/home/use/domain/www/index1.php

index1.php contains:
<?php
$_GET['force_template'] = 'index1';
include('scj/tube/index.php');
?>

Now the visitor gets page1 (layout 1) index.php for his first visit.
Then the visitor gets page2 (layout 2) index1.php for his second visit.

But if he clicks at any link from index1.php (layout 2) then he will see layout 1 in next step.

Is it possible that the visitor will see layout 2 for all other pages too?
Thanks.

Re: CJ Pages

Posted: Wed Mar 16, 2016 5:42 am
by admin
But if he clicks at any other link there - don't he has to see another template ? not index1 ?

or you want a surfer to click at index1 template and see the same template again ?

Re: CJ Pages

Posted: Wed Mar 16, 2016 8:20 am
by erosmembers
The second one, the user should see layout2, if he clicks at link in layout2.

Re: CJ Pages

Posted: Wed Mar 16, 2016 2:12 pm
by admin
Well, the easiest way is to add &force_template=... to links in the second template.
But to be honest I don't quite understand why you might need this .. any examples ?

Re: CJ Pages

Posted: Wed Mar 16, 2016 4:53 pm
by erosmembers
You offer the option, that a user can see a different layout if he visit the site again.
Very nice idea :-)
Let's say he get a different color schema second time.
Now he clicks at a thumb and then the visitor sees the old layout from his first visit?
It would be nice to have all other pages in the second layout too.
Or am I wrong?

Re: CJ Pages

Posted: Wed Mar 16, 2016 5:50 pm
by admin
Yes, so as i said before to let the script know that a certain page should be displayed using template index2 you should add to links &force_template=...