I just created a new page from the admin panel {Website-->Content-->Add Page} and i given the required data, Finally the new page is created. The Banners in the storefront URLs will open the newly added page.
Now i want to know the location of .tpl file of the newly added page. I searched the entire template folder, But i didn't find the .tpl file.
Anybody please help me to know the .tpl file location.
They all use the same design/themes/[your_theme]/templates/views/pages/view.tpl file.
Note that the mentioned template is responsible for all CMS pages, not only for the new one
Hi simtechdev & eComLabs,
Thanks for your help. Any change in that template will results in all the CMS pages. But i want to change my newly added page only. I want to add some content in that page which consists of Smarty coding, CSS styles and also some JavaScript.
So how can i add the requirements to the newly added template only, Without disturbing the remaining CMS pages.
Or you can use the standard 'My changes' add-on, create the hook file: design/themes/[your_theme]/templates/addons/my_changes/hooks/pages/page_content.pre.tpl with the following code:
{if $page.page_id == YOUR_PAGE_ID}
{*..... insert your code here ...... *}
{/if}
You can use .post or .override option to place your code in the desired place.
Or you can use the standard 'My changes' add-on, create the hook file: design/themes/[your_theme]/templates/addons/my_changes/hooks/pages/page_content.pre.tpl with the following code:
{if $page.page_id == YOUR_PAGE_ID}
{*..... insert your code here ...... *}
{/if}
You can use .post or .override option to place your code in the desired place.
Another way is to create separate layout page for this page.
- Log in the admin panel
- Go to Design -> Layouts
- Click on the Add layout page button
- Select the View page variant in the Dispatch selectbox
- Select your new page in the Pages tab
- Save the result
- Add the Main content block for the new layout page
- Add new block with the HTML block with SMARTY support type
- Add required code to the block content
As a result, the new block with and layout page will be used for the new CMS page only