Giter Site home page Giter Site logo

onepage_example's Introduction

One Page Site Example

This is an example theme of a one page site for Drupal 7. This is only intended to be an example and I do not intend to support this as a production ready project.


Basic Drupal 7 Configuration

Requirements:

  • Entity
  • Entity Reference
  • Inline Entity Form

You will need two content types. I used Basic Page as my first and created a second named Section.

Section Fields and Display

  • Create a new content type and call it “Section” or what ever makes sense to you.
  • Add an image field and call it “Background image”. No need to do extra configuration here. However if you decide to call this field something else you need to update the node.tpl to use this field.
  • Go to the Manage Display tab and move your background image to the disabled section and save.

Baisc Page Fields

  • Now on basic page create an entity reference field.
  • When creating this field choose the Inline Entity Reference Form as the widget.
  • Configure this field to use the Section content type and allow it to create new nodes.
  • Also set this to allow unlimited values (at the bottom in the global fieldset) and save.

Baisc Page Display

  • Goto the manage display on the Basic Page.
  • Hide the title of the entity reference field you just created.
  • Change the field formatter to Rendered Entity
  • Click the gear to the right of the field to manage it’s settings.
  • Set this field’s view mode to default or full and uncheck show links. Save the settings.
  • Now save the display settings.

From here you should be able to create a new Basic Page and add Sections at the same time. The theme should correctly insert the background image on the respective sections.


Better Documentation

Please let me know if I need to clarify any of the above. Just threw this together so I am sure there is missing information.

onepage_example's People

Contributors

jprasmussen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.