SPIP ignores Variants of templates

Hello,
The following template variants do not work for me:
I have section number 101, with articles in fa and en languages in it.
I have also files article.html for the main site’s language which is
fa, and article.en.html for the en language articles. Both work fine
in general.
I created two other variants to apply articles in section 101 with two
separate languages. They are: article=101.fa.html and
article=101.en.html
SPIP ignores these two variants and proceeds article.html for fa
language articles, and article.en.html for en language articles in
section 101, like the other sections.
The question is: where is my mistake, and how can I impalement those
two new variants?
Another question: How can I make a variant, targeting specific
article for example article2425.html without effecting other articles
in the same section?
Thank you
Kamran

Le 04.07.17 à 17:33, Kamran Mir Hazar a écrit :

Hello,
The following template variants do not work for me:
I have section number 101, with articles in fa and en languages in it.
I have also files article.html for the main site’s language which is
fa, and article.en.html for the en language articles. Both work fine
in general.
I created two other variants to apply articles in section 101 with two
separate languages. They are: article=101.fa.html and
article=101.en.html
SPIP ignores these two variants and proceeds article.html for fa
language articles, and article.en.html for en language articles in
section 101, like the other sections.
The question is: where is my mistake, and how can I impalement those
two new variants?
Another question: How can I make a variant, targeting specific
article for example article2425.html without effecting other articles
in the same section?
Thank you
Kamran
_______________________________________________
liste spip
spip@rezo.net - désabonnement : envoyer un mail à spip-off@rezo.net

Archives : https://www.mail-archive.com/spip@rezo.net/maillist.html

Infos : http://listes.rezo.net/mailman/listinfo/spip

Documentation de SPIP : http://www.spip.net/

Irc : de l'aide à toute heure : http://spip.net/irc

Are the variants put in the same folder?

I don't know it is possible to create a template for one specific article. However, I don't think it would be a good idea to write the article number with hard way. I suggest you use "compositions" plugins, which allow you to add a "composition" to an article, composition which will have its own package.

--
Maïeul

Yes, all are in the same folder.
The problem that I have with many SPIP plugins is that most of them
have French documentation, and I do not know French.
Google translator doesn't help all the time.
I try plugin Compositions.

On Tue, Jul 4, 2017 at 9:16 PM, Maïeul <maieul@maieul.net> wrote:

Le 04.07.17 à 17:33, Kamran Mir Hazar a écrit :

Hello,
The following template variants do not work for me:
I have section number 101, with articles in fa and en languages in it.
I have also files article.html for the main site’s language which is
fa, and article.en.html for the en language articles. Both work fine
in general.
I created two other variants to apply articles in section 101 with two
separate languages. They are: article=101.fa.html and
article=101.en.html
SPIP ignores these two variants and proceeds article.html for fa
language articles, and article.en.html for en language articles in
section 101, like the other sections.
The question is: where is my mistake, and how can I impalement those
two new variants?
Another question: How can I make a variant, targeting specific
article for example article2425.html without effecting other articles
in the same section?
Thank you
Kamran
_______________________________________________
liste spip
spip@rezo.net - désabonnement : envoyer un mail à spip-off@rezo.net

Archives : https://www.mail-archive.com/spip@rezo.net/maillist.html

Infos : http://listes.rezo.net/mailman/listinfo/spip

Documentation de SPIP : http://www.spip.net/

Irc : de l'aide à toute heure : http://spip.net/irc

Are the variants put in the same folder?

I don't know it is possible to create a template for one specific article.
However, I don't think it would be a good idea to write the article number
with hard way. I suggest you use "compositions" plugins, which allow you to
add a "composition" to an article, composition which will have its own
package.

--
Maïeul
http://blog.maieul.net
http://geekographie.maieul.net

Sorry for the problem of variant, I have no idea. Maybe you have to create also article=101.html ?
The main idea of compositions is that you can create a squelette called article-xxx.html where xxx is the name of a « composition » that you can set in the private space for one or more specific article. You must also have to create article-xxx.xml file along you article-xxx.html to create your composition

Le 4 juil. 2017 à 21:55, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Yes, all are in the same folder.
The problem that I have with many SPIP plugins is that most of them
have French documentation, and I do not know French.
Google translator doesn't help all the time.
I try plugin Compositions.

I got the idea of plugin Compositions. It is excellent. I made a test
Composition, and it works fine. I can use it to cover special events,
or highlight some important news. Thanks for your suggestion.
However, based on article Variants of templates - SPIP ,
logically, my first try of having template variants separated by
languages in the same section should work. Any possible bug?
I have version 3.1.6 [23444] installed.

Kamran

On Tue, Jul 4, 2017 at 11:54 PM, Maïeul Rouquette <maieul@maieul.net> wrote:

Sorry for the problem of variant, I have no idea. Maybe you have to create also article=101.html ?
The main idea of compositions is that you can create a squelette called article-xxx.html where xxx is the name of a « composition » that you can set in the private space for one or more specific article. You must also have to create article-xxx.xml file along you article-xxx.html to create your composition

Le 4 juil. 2017 à 21:55, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Yes, all are in the same folder.
The problem that I have with many SPIP plugins is that most of them
have French documentation, and I do not know French.
Google translator doesn't help all the time.
I try plugin Compositions.

Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

Tested! Adding article=101.html doesn't help.

On Wed, Jul 5, 2017 at 11:26 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

Sorry, no idea ;-( Maybe it is a bug of SPIP…

Le 5 juil. 2017 à 11:45, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Tested! Adding article=101.html doesn't help.

On Wed, Jul 5, 2017 at 11:26 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

Maybe SPIP core developers have seen this post, and in case of bug,
they fix it in the next version.
I use plugin Formulaire de contact avancé, and I wanted to insert
#FORMULAIRE_CONTACT directly inside the template files. That is why I
came across this multi-variant. Now, from private area, I use ajax div
class of the plugin, and put it inside the Text area of the articles.
Thanks again!
Kamran

On Wed, Jul 5, 2017 at 11:45 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

Sorry, no idea ;-( Maybe it is a bug of SPIP…

Le 5 juil. 2017 à 11:45, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Tested! Adding article=101.html doesn't help.

On Wed, Jul 5, 2017 at 11:26 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

YOu should open an issue on core.spip.net

Le 5 juil. 2017 à 12:04, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Maybe SPIP core developers have seen this post, and in case of bug,
they fix it in the next version.
I use plugin Formulaire de contact avancé, and I wanted to insert
#FORMULAIRE_CONTACT directly inside the template files. That is why I
came across this multi-variant. Now, from private area, I use ajax div
class of the plugin, and put it inside the Text area of the articles.
Thanks again!
Kamran

On Wed, Jul 5, 2017 at 11:45 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

Sorry, no idea ;-( Maybe it is a bug of SPIP…

Le 5 juil. 2017 à 11:45, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Tested! Adding article=101.html doesn't help.

On Wed, Jul 5, 2017 at 11:26 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

I'll do. They just approved my account.

On Wed, Jul 5, 2017 at 12:06 PM, Maïeul Rouquette <maieul@maieul.net> wrote:

YOu should open an issue on core.spip.net

Le 5 juil. 2017 à 12:04, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Maybe SPIP core developers have seen this post, and in case of bug,
they fix it in the next version.
I use plugin Formulaire de contact avancé, and I wanted to insert
#FORMULAIRE_CONTACT directly inside the template files. That is why I
came across this multi-variant. Now, from private area, I use ajax div
class of the plugin, and put it inside the Text area of the articles.
Thanks again!
Kamran

On Wed, Jul 5, 2017 at 11:45 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

Sorry, no idea ;-( Maybe it is a bug of SPIP…

Le 5 juil. 2017 à 11:45, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Tested! Adding article=101.html doesn't help.

On Wed, Jul 5, 2017 at 11:26 AM, Maïeul Rouquette <maieul@maieul.net> wrote:

I think that (maybe) we need article=101 to allow article=101.language

Le 5 juil. 2017 à 11:01, Kamran Mir Hazar <mirhazar.kamran@gmail.com> a écrit :

Hi
I have article.html that already represents the main language which is fa, and I do not need article.fa.html. Variant article.en.html is created to represent en language articles. They work fine. In addition, I was created article=101.fa.html and article=101.en.html to represent seperate variants of both languages in section 101.
Kamran

On Jul 5, 2017 10:02, "cam.lafit@azerttyu.net" <cam.lafit@azerttyu.net> wrote:
Hi

Have you create article.html , article.en.html , article.fa.html ?

To enable article=XX.html feature article.html must be present.
to enable language variant, I think we must act same.

If don't work looks a bug.

Km

Le 05/07/2017 à 12:15, Kamran Mir Hazar a écrit :

I'll do. They just approved my account.

I replied in fact ! template variants and possible bug? (#3972) · Tickets · spip / spip · GitLab

MM.