Jump to content
TNG Community

USING MULTIPLE TEMPLATES


Jean-Marie Robert

Recommended Posts

Jean-Marie Robert

My site has 2 different trees. Is it possible to use a different template for each tree. I have been using template #10 for the past five years. I am currently using TNG 13.0.3

Link to comment
Share on other sites

Leif Sweden

I have 10 different trees at my site and I don´t think it is possible to use different templates with only one license. I am also using TNG 13.0.3.

Leif

Link to comment
Share on other sites

5 hours ago, Jean-Marie Robert said:

it possible to use a different template for each tree

Don't believe there is a mod to do exactly what you are requesting. The Template_Switch mod does allow users to switch templates at any time on any page. The user would have to select the template each session, since the choice is not saved.  It has some Options to specify admin/registered user/or visitor access to this feature.  It is not tied to trees, however.  It assumes home pages & template settings for the desired templates have been setup, otherwise the defaults will appear.  Unused or unwanted templates could be removed within the mod with slight modification.  As the author, I could help with that.  

Link to comment
Share on other sites

Jean-Marie Robert

I have installed the Each_Tree_Its_Template  mod and it does exactly what I wanted to do. I am still using template 10 for my home page and with this mod TNG switches to template 12 on the other tree. Many thanks to everybody that took time to reply to my request.

J.M. Robert

Link to comment
Share on other sites

Michel KIRSCH
On 4/15/2021 at 8:47 PM, Leif Sweden said:

I have 10 different trees at my site and I don´t think it is possible to use different templates with only one license. I am also using TNG 13.0.3

Leif,

you can try the Each Tree its template Mod. It will do the job.

Michel

Rob : thx for the advertising :-)

 

 

Link to comment
Share on other sites

Leif Sweden

Michel,

Saw your comment now (have been doing other things), but when I try to download the mod v12.3.0.2 .I get following answer: hhhmmm. LeifSweden seems to be not registered... Updating user's table.... 
hhhmmm. LeifSweden ne semble pas enregistré... Tentative de mise a jour de la tables des utilisateurs....
Second verification...for LeifSweden
Désolé - Sorry, LeifSweden N'est PAS enregitré - is NOT registered !

But I am loged in, why is that?

Leif

Link to comment
Share on other sites

Leif,

Where are you logged in?  Best I can tell you do not have a username on the TNG Wiki which is a different server than the TNG forum.

Michel,

I guess your code does not return the same notice to the unlogged in user that provides a link to the TNG Wiki Register Account form as the Click Counter III does

Link to comment
Share on other sites

2 hours ago, Leif Sweden said:

But I am loged in, why is that?

Leif

Due to how/where  the Forum and Wiki are hosted, there are 2 logins required.

One is for the Forum where you have posted your question. You created this account on January 28, 2020.

The other is for the Wiki, where you can download the Mod. You have an account on the Wiki, https://tng.lythgoes.net/wiki/index.php/User:Leif_Sweden  . You created this account on 8 November 2020 . Login using this account on the Wiki. The Login link is on the top right of the Wiki page.

If you have logged in to the Wiki the problem will be as Michel describes in his last post, where your user name has a space in it.

Link to comment
Share on other sites

Michel KIRSCH

Yes Ken,

I always have a problem with users with a space in their user name..

The cases are so rare that I do not have the opportunity to study the problem.

Leif : you can retry... Sorry for the inconvenience.

 

Michel

 

Link to comment
Share on other sites

Sorry, I did not search for entries starting with Leif.

I thought of indicating that users should not use space in usernames, but I do not know enough javascript and jQuery to stop users from entering spaces in usernames, so I chose not to add that to the Regirstration form when I upgraded to MediaWiki 1.35.1

Link to comment
Share on other sites

Leif Sweden

Michel,

As I said earlier I have now installed your mod, when I in Mod handler look into the mod the language is French or Belgian which I don´t understand. How can I change to Swedish?

Can you also tell me where I can give the trees different template, (I am really not good in handling this)?

Leif

Link to comment
Share on other sites

Michel KIRSCH

OK Leif.

No problem to handle multiple trees?

Don't forget to designate your default template !

Michel

Link to comment
Share on other sites

I have two different sites (both licensed) and for about two years there were different templates.  I now use the same template on both, and it made things much easier and the buttons were always in the same place.  I would suspect this would be the same issue on one site, with different templates for each tree.

Link to comment
Share on other sites

Jean-Marie Robert

I have one site on which I publish all my research on the ROBERT surname, since 2015. It has been upgraded trough time up to version 13.0.3. I presently have more than 56,000 files all documented with sources. Since February 2021, I am hosting the works of another expert on the ROBERT surname. This is a way for both of us to collaborate and share our research. The idea of having a different template for each of our works is making things much easier when comparing the file of a person, from my research to his. Michel Kirsch mod is helping both of us. Here is an example of our common ancestor Louis Robert dit Lafontaine.

Louis Robert by J.M. Robert:

Louis ROBERT dit Lafontaine b. Sep 1638 La Rochelle, Charente-Maritime, France d. 1 Jan 1711 Boucherville, Qc: Grande Famille ROBERT

Louis Robert by David P. Robert:

Louis Robert, dit Lafontaine d. 01 Jan 1711 Boucherville, Chambly, Qc: Grande Famille ROBERT

So thanks to Michel Kirsch for writng this mod

Link to comment
Share on other sites

Michel KIRSCH
1 hour ago, Rob Roy said:

I have two different sites (both licensed) and for about two years there were different templates.  I now use the same template on both, and it made things much easier and the buttons were always in the same place.  I would suspect this would be the same issue on one site, with different templates for each tree.

You're right Rob. It's easyer. But the problem is not the same.

I use two sites : one for tests and one online for users.

To be sure to not makes useless changes on my test site, i use the same template but with differents colors.

On the online site, i have 5 differents tree. Some person are the same or have the same name on multiple trees.

To be sure that i work on the good tree, i use 5 different templates : one for each tree.

Michel

Link to comment
Share on other sites

Newfloridian

I must agree with Rob also. However, there is one other consideration - and that is the audience for your website. I have used template 4 for over 15 years. I have one main family tree which is divided into 7 branches. I also hold a second tree which isn't family history at all (my University Yearbook!).  The website runs as a colour supplement and I have arranged for each branch to have its own colour scheme, banner and navigation menu (7 - one for each branch; 1 - for the Yearbook; 1 - for a contents section)

The huge advantage in this (and this comes from that number of years of reader feedback) is that use of the single template means that the reader remains familiar with the overall appearance of the site but can readily differentiate between the branches. Most of our research is now presented as illustrated articles created in historytemplate.php of which we now have over 500.

Cheers Alan

 

Link to comment
Share on other sites

Leif Sweden

Hi Michel,

I have as a test created different guest log in (for myself) to see if the different  trees change template completely, but it is only parts of each tree that use its template. The cretaed log in has only access to a certain tree so it is a bit strange, I thought that this special log in only could see just this tree.

When I log in with one of my created guest log in my default template is shown (not the template for that tree).
If I click "home" my default template is shown on every tree (not the start  page for that tree).
If I search for a name I know belongs to this tree it change to the correct template but if I search for a person who belongs to another tree (which this Guest don´t have access to the person is shown with the template for that tree. So even if that log in has access only to one tree the person for another tree is shown.

 It can be at bit confusing for guests that different templates are displayed for the tree that the guest has access to.

Maybe this is not what the mod was created for but I thought the mod could do all this. Please, let me have your answer.

Leif

Link to comment
Share on other sites

Michel KIRSCH

Leif,

1 hour ago, Leif Sweden said:

If I search for a name I know belongs to this tree it change to the correct template but if I search for a person who belongs to another tree (which this Guest don´t have access to the person is shown with the template for that tree. So even if that log in has access only to one tree the person for another tree is shown.

For this, the Mod is certainly not in cause. If the user you create is restricted to one tree, he can not access persons of an another tree.

Please verify in Setup>>General settings>>Privacy how your settings Require Login: AND Restrict access to assigned tree: are defined (yes for the two)

For the other things

1 hour ago, Leif Sweden said:

When I log in with one of my created guest log in my default template is shown (not the template for that tree).
If I click "home" my default template is shown on every tree (not the start  page for that tree).

Yes, it is the normal behaviour of the Mod. Why? Because it was first developped for Admins. But I can see if it is possible to have ALL the pages with the same template when changing of tree. (I don't think it's possible because actually, in the code, where the template is changed, the tree is not yet known by the system...).

So actually the template's change are applied only to "common" pages

But I will check

Michel

Link to comment
Share on other sites

Leif Sweden
29 minutes ago, Michel KIRSCH said:

Leif,

For this, the Mod is certainly not in cause. If the user you create is restricted to one tree, he can not access persons of an another tree.

Please verify in Setup>>General settings>>Privacy how your settings Require Login: AND Restrict access to assigned tree: are defined (yes for the two)

For the other things

Yes, it is the normal behaviour of the Mod. Why? Because it was first developped for Admins. But I can see if it is possible to have ALL the pages with the same template when changing of tree. (I don't think it's possible because actually, in the code, where the template is changed, the tree is not yet known by the system...).

So actually the template's change are applied only to "common" pages

But I will check

Michel

Michel,

My settings were wrong, when I changed to Yes, Yes, it works only for one tree. Thanks.

I look forward to your check if it is possible.

Leif

Link to comment
Share on other sites

Michel KIRSCH
8 minutes ago, Leif Sweden said:

it is the normal behaviour of the Mod. Why? Because it was first developped for Admins. But I can see if it is possible to have ALL the pages with the same template when changing of tree. (I don't think it's possible because actually, in the code, where the template is changed, the tree is not yet known by the system...).

It is the reason why you MUST design a default template (this is an old Mod so I have to refresh my memory)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...