Where Can We Find The .tpl File Of Newly Added Page

Hi,

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.

Regards,

Satya.

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

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.

Please help me to solve my issue.

Regards,

Satya.

You can modify the design/themes/[your_theme]/templates/views/pages/view.tpl, for example replace it with this code:

{hook name="pages:page_content"} {if $page.page_id == YOUR_PAGE_ID} {*..... insert your code here ...... *} {else}
{$page.description nofilter}
{/if} {/hook}

{capture name=“mainbox_title”}{$page.page}{/capture}

{hook name=“pages:page_extra”}
{/hook}

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

You can modify the design/themes/[your_theme]/templates/views/pages/view.tpl, for example replace it with this code:

{hook name="pages:page_content"} {if $page.page_id == YOUR_PAGE_ID} {*..... insert your code here ...... *} {else}
{$page.description nofilter}
{/if} {/hook}

{capture name=“mainbox_title”}{$page.page}{/capture}

{hook name=“pages:page_extra”}
{/hook}

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

Thanks for giving the solution...

You are welcome!