2lang&2site/subsite

Questions about how to install and problems installing - please read the documentation first!
Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

2lang&2site/subsite

Post by Tata » Sat Aug 01, 2015 10:33 pm

The 2site and/or subsite were possible in older versions. Now I build a website for my planned enterprise that would offer 4 areas of services. The website look like this:
http://treefrognursery.cmsimple.sk
There are 4 frogs below the banner. Each is dedicated for one area of activities.
There is the menu on the top. But it calls only the nursery pages which run on their own template. Content on the "intro page" is excluded from the template.
I would like to have som content also on the "intro page". So the menu on the top would call the general pages. The very first page is empty and its alternative heading is empty, so no content is shown. As the content min-height in the stylesheet is set to "0" - if the page is opened, no content is visible. That's fine.
I would like to call the "nursery page" via the first frog (and the same way to call pages for FTC, ACADEMY and CONSULTANCY. It would be very easy having separate installations for each one. But as the pages may use the sane surce files, it would be excellent to use 2site feature. So each area would have its own content file. That would be enough. I mean - each frog would change the very top line (e.g. to the background related to the cap and there also the menu of respective 2site. From there then the respective content-pages. Now the green menu would call the "intro content".
Is this possible with CMSimple-XH 1.6.7 at all? It would be though possible via 2lang. But I can't find the way, how to call such pages from the menu. How would you solve it?
BTW, what are your comments to the template. I personally like it ;)
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: 2lang&2site/subsite

Post by cmb » Sun Aug 02, 2015 12:43 pm

Indeed, CMSimple_XH 1.6 has no subsite feature; you may emulate that with 2lang, but I'm not sure, if that's beneficial/necessary at all. If you don't expect too much content, a single content.htm for the whole site is usually preferable. You still can do a lot with the quite flexible toc()/li() functions, and with page-specific templates (note that these affect subpages as well as of XH 1.6).

PS: Yes, the template is very nice! :)
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: 2lang&2site/subsite

Post by Tata » Sun Aug 02, 2015 5:17 pm

So, I made it somehow, but it is terrible work.
I needed to modify:
1. tlpfuncs.php (#688):

Code: Select all

$t .= '<a href="' . $url . '"><div class="flagbox" >'.$el. '</div></a> '; // added <div... class="flagbox">...</div>     
2. core.css - cancel attributes for

Code: Select all

.flag{}
3. define classes in stylesheet.css:

Code: Select all

.flag {
	min-width: 0;
	padding: 0.5em;
	border: 1px dotted #888;
}
div.flagbox{
	background: yellow;	display: inline-table;
	background: #fafafa;
	padding: 0.5em;
	margin: 0.5em 0;
}
.flag:hover{
	background: #f0f0f0;
}
4. modify config.php

Code: Select all

$cf['language']['2nd_lang_names']="tn=TREE FROG NURSERY;ta=TREE FROG ACADEMY;tf=TREE FROG FREE TIME CENTER;tc=TREE FROG CONSULTANCY;";
5. Set a template for each parcular subpage in each language.
This all seems to me to be very complicated.

But here is the result: treefrognursery2.cmsimple.sk
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: 2lang&2site/subsite

Post by cmb » Sun Aug 02, 2015 7:15 pm

Well, I'm not sure what you're actually trying to accomplish, but maybe it is sufficient to have a single content.htm with 5 toplevel pages (intro page + nursery + ftc + consultancy + academy). The main menu on top would only show the second level pages (toc(2)). The content of the intro page would be the 4 frog images manually linked to the other top level pages. If necessary/desired, you can set individual templates for each of the top level pages only.
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: 2lang&2site/subsite

Post by Tata » Sun Aug 02, 2015 7:49 pm

Shit!!! I have absolutely neglect this totally simple way. I'll make it tomorrov. Great thank for the hint.
Sometime one can't see the forest because of a tree...
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: 2lang&2site/subsite

Post by Tata » Mon Aug 03, 2015 8:54 pm

Almost ready. I am pretty sttisfied with it. Just the styling of flexslider was a little tricky.
http://treefrognursery.cmsimple.sk/
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply