9 years ago
Topic

Hi!

I've got two different content types for my content, and each content type has a different content template. I've installed both and assigned the templates to each content type, both intro and content. Now, the problem is: no matter which content I open, its always rendered by the same template (its the one i made first)?

Any ideas where I can fix this issue? 

Thanks! Marc

Get a VIP membership
9 years ago
1
Level 1

Hello marcmueller,

you can't create 2 content type to display 1 content.

A content created from a content type is always displayed with this content type.

If you need to have 2 renders for a content depending on some conditions, you can use the position override in the content view, or variations.

Best regards.

Lionel

9 years ago
0
Level 2

HI Lionel!

Thanks for answering so quickly :-)

To clarify: I got 2 content types and also content for both content types. The problem is that content of type "B" uses the template of content "A". Content A uses the right template. So it seems to me, that for content "B" the wrong template is used.

Is it possible to have one template for each content type?
Am I missing some additional settings here?

Thanks!

Marc

9 years ago
1
Level 1

Hi marcmueller,


how you can say "I got 2 content types and also content for both content types" ?

When you add a content from the form of a content type, this content is linked with this content type, and that's all.

Then when you display the content view of a content, it use the content view of the content type with which it is linked.


So, like I said previously, if you need to have differents render for the content view, you must use override position or variations.

At the beginning of your override or variation, you can check the Itemid to chosse the layout to display


Best regards.

Lionel

9 years ago
0
Level 2

Lionel,

Theres a misunderstanding.

Content-Type A has template A
Content-Type B has template B

Content A is of content-type A,
Content B is of content type B


Now, the problem is: Content B is being displayed in template A.
I hope this clears things up. Where did I do wrong, some settings?

Thanks! Marc

9 years ago
1
Level 1

Hi marcmueller,

ok, I understand your context !

By cons I don't see how it's possible.

Are you sure that the content B was created with the content type B ?

When you speak about template, can you explain which type of template for which content type.


Best regards.

Lionel

9 years ago
0
Level 2

Lionel, thanks!

It turned out that it was working properly, I had the same index.php in my template B :-)

Cheers, Marc

Get a VIP membership