Skip to content

Layout got rendered twice. #2754

Answered by andika-eka
andika-eka asked this question in Q&A
Discussion options

You must be logged in to vote

I replace the <slot /> tag with <ContentDoc />. I followed this documentation

So it should be something like:

<template>
    <div class="container">
        <h1>container</h1>
        <div class="content">
            <h1>content</h1>
            <ContentDoc />
        </div>
    </div>
</template>

<script>

</script>

<style lang="scss" scoped>
    .container{
        padding: 2em;
        border-style: solid;
        border-color: red;
    }
    .content{
        padding: 2em;
        border-style: solid;
        border-color: blue;
    }
   
</style>

I guess we cant use the same template as the pages

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by andika-eka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants