GithubHelp home page GithubHelp logo

folder's Introduction

Folder Field Type

A smooth way to embed the PyroCMS file manager interface in your admin forms. Pages, Streams, and other streams enabled modules can make use of it.

Author

Legal

  • Apache2 License
  • © Copyright 2013 Jerel Unruh

Usage

  1. Add it to addons/shared_addons/field_types with this field type's folder named folder.
  2. Make sure at least one folder exists in CP > Content > Files for the uploads or subfolders to reside in.
  3. Create a new field (in Page Types or Streams) using Folder as the type.
  4. Now when you edit or create a Page or Stream Entry a simplifed file manager interface will be shown in the form.
  5. Upload, edit, and delete files as you wish.

To output the files use the field slug in a double tag. For example if you named your field Gallery you would output the images like so:

{{ gallery }}
    <img src="{{ url:site }}files/thumb/{{ id }}" alt="{{ name }}"/>
{{ /gallery }}

folder's People

Contributors

jerel avatar madbonkey avatar

Stargazers

 avatar Louie Jay dela Cruz avatar Osvaldo Brignoni avatar Ryun Shofner avatar

Watchers

 avatar Osvaldo Brignoni avatar James Cloos avatar  avatar

folder's Issues

Images doesn't show on template and more than one field not works

Hi I'm having two issues:

  1. when I create two fields using Folder type first doesn't work I can't select images
  2. after save the page I can't see any images in the created page.

I'm using PyroCMS Community 2.2.1 and a template file for my page type. This is the code I'm using for show images:

<ul class="slides">
  {{ imagenes_slider }}
    <li><img src="{{ url:site }}files/thumb/{{ id }}" alt="{{ name }}" /></li>
  {{ /imagenes_slider }}
</ul>

{{ promociones }}
 <li class="col3 item">
   <div class="view"><img src="{{ url:site }}files/thumb/{{ id }}" alt="{{ name }}" /></div>
 </li>
{{ /promociones }}

Of course imagenes_slider and promociones are the slugs for the field Folder types, any help?

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.