Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to include CMS page content in a page

    General Discussion
    2
    6
    410
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wallace last edited by

      Hi,
      I've created a CMS page and I would like to add its content (not just the url) in a section of page.
      For example, the category page have a left column with filters... my idea is to remove filters and place in the left column the content of my CMS page.
      How can I do it?

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by devansh-webkul

        For that, I suggest you create one route, controller, and view in the code and just add your category column code and cms code.

        Or if you want this behavior in all CMS pages then I suggest you edit the layout of the CMS page.

        1 Reply Last reply Reply Quote 0
        • W
          wallace last edited by

          ok, thank you, but in the second case (editing layout of the CMS page), how could I then include its content in my (for example) layered-navigation.blade.php?

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            It's just simple dynamic content coming from the variables. You just need to design according to your own and put that variable wherever you want.

            Reference:
            For velocity,
            https://github.com/bagisto/bagisto/blob/0429fa1d4891e1cc9ab88312e73f697d98ab6bcb/packages/Webkul/Velocity/src/Resources/views/shop/cms/page.blade.php#L23

            For default,
            https://github.com/bagisto/bagisto/blob/0429fa1d4891e1cc9ab88312e73f697d98ab6bcb/packages/Webkul/Shop/src/Resources/views/cms/page.blade.php#L16

            1 Reply Last reply Reply Quote 0
            • W
              wallace last edited by

              Hi,
              I'm sorry, but may be my request was not clear. I have:

              1. layered-navigation.blade.php
              2. myCMSpage defined in the admin panel

              Now I'd want that the layered-navigation.blade.php shows the content of myCMSpage.
              So, I don't need to edit ../cms/page.blade.php, but I need to edit layered-navigation.blade.php, may be replacing:
              <layered-navigation></layered-navigation>
              with such a code that invokes the content of myCMSpage.

              Thank you sincerily again for your help

              1 Reply Last reply Reply Quote 0
              • devansh-webkul
                devansh-webkul last edited by

                In that case, you need to customize your own component.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post