Skip to Content
author's profile photo Former Member
Former Member

Creating new page Template

Hi, I have created new page template , pages and added components in that but i'm not able see the content in cms cockpit console.Can some one tell me what I need to do to make that visible and also how and where can I bind/define css, javascript and images for my template?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2015 at 05:08 AM

    You can make changes in cms-content.impex and see the updated changes in HMC. To make the changes live, sync the website where the contents are updated.

    The individual page that gets rendered inside the template is passed via the controller (which in turn loads a jsp view). You can make changes to css/js tag files present in the pages.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2015 at 07:44 AM

    hi, Thanks for response :) I'm UI Developer.So, not much knowledge about java controllers and all.So, if you can provide me some more details or some related links, that would be really very helpful .

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2015 at 09:02 AM

    Hi, have you imported the new templates via impex?

    For example the ProductDetailsPageTemplate Import (file: cms-content.impex):

     # Create PageTemplates
     # These define the layout for pages
     # "FrontendTemplateName" is used to define the JSP that should be used to render the page for pages with multiple possible layouts.
     # "RestrictedPageTypes" is used to restrict templates to page types
     INSERT_UPDATE PageTemplate;$contentCV[unique=true];uid[unique=true];name;frontendTemplateName;restrictedPageTypes(code);active[default=true]
     ;;ProductDetailsPageTemplate;Product Details Page Template;product/productLayout2Page;ProductPage
     
     # Add Velocity templates that are in the CMS Cockpit. These give a better layout for editing pages
     # The FileLoaderValueTranslator loads a File into a String property. The templates could also be inserted in-line in this file.
     UPDATE PageTemplate;$contentCV[unique=true];uid[unique=true];velocityTemplate[translator=de.hybris.platform.commerceservices.impex.impl.FileLoaderValueTranslator]
     ;;ProductDetailsPageTemplate;$jarResourceCms/structure-view/structure_productDetails2PageTemplate.vm
     
     # Product Details Page Template
     # The CrossSelling and UpSelling slots are designed for related products, cross-sells and up-sells.
     INSERT_UPDATE ContentSlotName;name[unique=true];template(uid,$contentCV)[unique=true][default='ProductDetailsPageTemplate'];validComponentTypes(code);compTypeGroup(code)
     ;SiteLogo;;;logo
     ;HeaderLinks;;;headerlinks
     ;SearchBox;;;searchbox
     ;MiniCart;;;minicart
     ;NavigationBar;;;navigation
     ;Section1;;;wide
     ;Section2;;;wide
     ;Section3;;;wide
     ;Section4;;;wide
     ;VariantSelector;;ProductVariantSelectorComponent;narrow
     ;AddToCart;;ProductAddToCartComponent;narrow
     ;CrossSelling;;ProductReferencesComponent;narrow
     ;UpSelling;;ProductReferencesComponent;narrow
     ;Footer;;;footer
     ;Tabs;;CMSTabParagraphContainer
     ;TopHeaderSlot;;;wide
     ;BottomHeaderSlot;;;wide
     
     # Bind Content Slots to Page Templates
     INSERT_UPDATE ContentSlotForTemplate;$contentCV[unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,$contentCV)[unique=true][default='ProductDetailsPageTemplate'];contentSlot(uid,$contentCV)[unique=true];allowOverwrite
     ;;SiteLogo-ProductDetails;SiteLogo;;SiteLogoSlot;true
     ;;HomepageLink-ProductDetails;HomepageNavLink;;HomepageNavLinkSlot;true
     ;;HeaderLinks-ProductDetails;HeaderLinks;;HeaderLinksSlot;true
     ;;SearchBox-ProductDetails;SearchBox;;SearchBoxSlot;true
     ;;MiniCart-ProductDetails;MiniCart;;MiniCartSlot;true
     ;;NavigationBar-ProductDetails;NavigationBar;;NavigationBarSlot;true
     ;;Accessories-ProductDetailsPage;UpSelling;;UpSellingSlot;true
     ;;VariantSelector-ProductDetails;VariantSelector;;VariantSelectorSlot;true
     ;;AddToCart-ProductDetails;AddToCart;;AddToCartSlot;true
     ;;CrossSelling-ProductDetailsPage;CrossSelling;;CrossSellingSlot;true
     ;;Tabs-ProductDetailsPage;Tabs;;TabsSlot;true
     ;;Footer-ProductDetails;Footer;;FooterSlot;true
     ;;TopHeaderSlot-ProductDetails;TopHeaderSlot;;TopHeaderSlot;true
     ;;BottomHeaderSlot-ProductDetails;BottomHeaderSlot;;BottomHeaderSlot;true
     
     # Product Details Page
     INSERT_UPDATE ProductPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);defaultPage;approvalStatus(code)[default='approved']
     ;;productDetails;Product Details;ProductDetailsPageTemplate;true;
    
    

    I hope this can help you ;)

    Good link for you: How To Add a New CMS Page Template - Tutorial

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.