We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50861
    • 1 Posts
    MODx Revo 2.3.3 (release 56)
    so i am about to create my own template, and may have ran into a big (from my view) hurtle.

    i know you use the content tag in your template and so that when you create a new document, the content gets injected into that tag on the front-end. i got that.

    what i am going to run into issue with is how i created my html.
    		<section>
    			<header></header>
    			<div class="section-content"></div>
    			<footer></footer>
    		</section>
    


    i have my content divided into different section tags like above, so one of my pages could look like:
    		<section>
    			<header>Section 1</header>
    			<div class="section-content"></div>
    			<footer></footer>
    		</section>
    
    		<section>
    			<header>Section 2</header>
    			<div class="section-content"></div>
    			<footer></footer>
    		</section>
    


    i have no issues going in to edit the html directly on the pages, but if i have a non-coder person going in to edit content, i don't want them to foo anything up.

    I know articles is setup in a way that allows for something like this and each article section is created in the same way i can give an example, but i would rather not have to set my entire site up in articles if possible. [ed. note: maniacalkitten last edited this post 8 years, 8 months ago.]
      • 4172
      • 5,888 Posts
      There are several ways to get that done.

      1. Have multiple sub-resources in the tree. One Resource for each section and get the sections with getResources or pdoResources (packaged with pdoTools)

      2. Install MIGX and have a MIGX-TV. One Item for each section.

      3. Get https://www.modmore.com/extras/contentblocks/ from modmore. Each Section would be a Content - Block.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!