Layout Create New Location

Hi there,

I am trying to duplicate a page layout. I have a custom layout for my products.view. However, I want a different layout for each product. I've built a custom layout that I would like to copy and change for the other products.

Is it possible to copy the layout location inside the XML file and just make another layout of same sort? I've spent hours now trying to figure it out. However, I cannot get it working. It seems some values are stored in the database, so I probably need to use the visual builder?

Thanks

Chris

Hi there,

I am trying to duplicate a page layout. I have a custom layout for my products.view. However, I want a different layout for each product. I've built a custom layout that I would like to copy and change for the other products.

Is it possible to copy the layout location inside the XML file and just make another layout of same sort? I've spent hours now trying to figure it out. However, I cannot get it working. It seems some values are stored in the database, so I probably need to use the visual builder?

Thanks

Chris

Hello Chris!

Why don't you use the layouts tab on the product details page?

Hi,

I want a specific layout for each product. However, that layout was a lot of work to build. Having to manually build it for each product, is a lot of work. Isn't there a way to copy it? I've tried it through the layouts.xml file, however, the containers seem to have unique IDs that are stored in the database. So those need to be created somehow?

Thanks

Chris

Anyone? I cannot think that I'm the first person ever that wants to do this?

Thanks

Chris

Anyone? I cannot think that I'm the first person ever that wants to do this?

Thanks

Chris

I am afraid, it is not possible to import layout for each product

That's really sad.

If one has complex products, I really is a lot of work to do the layout for each product.

Anyways, thank you.

Regards

Chris

That's really sad.

If one has complex products, I really is a lot of work to do the layout for each product.

Anyways, thank you.

Regards
Chris


Hire someone to perform this modification for you. Our team is at your service

Contact our Cs-Cart developers too. We are ready to help.

Best regards,

Alt-team.

We also will be glad to help you. Please contact us at sales@simtechdev.com

Thanks.

I'll send you a mail.

I have another question. Is it possible to add a new template for a block? For the Testimonials block, there is just 1 template in the default theme. Is it possible to create a another template?

Thanks

Chris

I have another question. Is it possible to add a new template for a block? For the Testimonials block, there is just 1 template in the default theme. Is it possible to create a another template?

All templates are listed in the following file:

app/addons/discussion/schemas/block_manager/blocks.post.php

    'templates' => array(
        'addons/discussion/blocks/testimonials.tpl' => array(),
    ),

You can extend this schema with the addon or edit the file directly

All templates are listed in the following file:

app/addons/discussion/schemas/block_manager/blocks.post.php

    'templates' => array(
        'addons/discussion/blocks/testimonials.tpl' => array(),
    ),

You can extend this schema with the addon or edit the file directly

I'm not getting it right.

I want to be able to create “addons/discussion/blocks/testimonials1.tpl” for instance and then make my new template for that block. I want to display the testimonials in the page header and it must have a different layout from the rest. However, I'm not sure how to do this.

Would your company be able to do such changes?

Thanks

Chris

I'm not getting it right.

I want to be able to create “addons/discussion/blocks/testimonials1.tpl” for instance and then make my new template for that block. I want to display the testimonials in the page header and it must have a different layout from the rest. However, I'm not sure how to do this.

Would your company be able to do such changes?

1. Replace

'addons/discussion/blocks/testimonials.tpl' => array(),

with

'addons/discussion/blocks/testimonials.tpl' => array(),
'addons/discussion/blocks/testimonials1.tpl' => array(),

2. Create new template in the following directory (just copy the default one)

design/themes/THEME/templates/addons/discussion/blocks/

3. Make necessary changes and clear cache

4. Go to layout manager and replace default block with the new one

5. Check the result

PS Most possibly these changes will be deleted after next upgrade. It is better to extend schema with the My changes module

PS2 If you face any problem with the realisation, feel free to contact us to get a free quote

Great, thanks! That solved the issue!

Any way I can give the 2nd template a different name?

Thanks

Chris

Great, thanks! That solved the issue!

Any way I can give the 2nd template a different name?

Thanks

Chris

Just change first line of the template from

{** block-description:discussion_title_home_page **}

to

{** block-description:discussion_title_home_page1 **}

Then add discussion_title_home_page1 language variable on the Administration -> Languages -> Translations page