- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2021
12:53 AM
04-22-2021
12:53 AM
Get template script partially working on CMS page
If i using sinlge script it is working,
{{block class="Amasty\Storelocator\Block\Location" name="location.block" template="Zero_Storelocator::home-page-mobile1.phtml" }}
If i add two more script it is not working,
{{block class="Amasty\Storelocator\Block\Location" name="location.block" template="Zero_Storelocator::home-page-mobile1.phtml" }} {{block class="Amasty\Storelocator\Block\Location" name="location.block" template="Zero_Storelocator::home-page-mobile2.phtml" }} {{block class="Amasty\Storelocator\Block\Location" name="location.block" template="Zero_Storelocator::home-page-mobile3.phtml" }}
Each script working when i call individually, if i call all the script at the same time first line of the script only working, the remaining script not working.
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2021
03:57 AM
04-22-2021
03:57 AM
Re: Get template script partially working on CMS page
The problem here is block names used for all the scripts.
Block names should be unique (you added for all the blocks name="location.block").
So all the previous blocks will overridden by the last block that is why you are not able to see all three blocks at a time.
Try with below code
{{block class="Amasty\Storelocator\Block\Location" name="location.block1" template="Zero_Storelocator::home-page-mobile1.phtml" }} {{block class="Amasty\Storelocator\Block\Location" name="location.block2" template="Zero_Storelocator::home-page-mobile2.phtml" }} {{block class="Amasty\Storelocator\Block\Location" name="location.block3" template="Zero_Storelocator::home-page-mobile3.phtml" }}
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2021
07:18 AM
04-22-2021
07:18 AM
Re: Get template script partially working on CMS page
Still not getting the value,
if i use it individually it is working,
if i add 3 script at the same time its not working.