Code Monkey home page Code Monkey logo

evo2evo's Introduction

evo2evo

MODX Evolution Snippet to Display Content from a remote MODX Evolution (or Revolution) database

http://www.tattoocms.it/extras/snippets/evo2evo-display-content-from-a-remote-modx.html

##Example calls

Display content from document id 32 with db info parameters

[!Evo2Evo? &id=`32` &evoTpl=`evoTpl` &evo_url=`http://yourmodxsite.com` &db_hostname=`localhost` &db_username=`root` &db_password=`` &db_database=`evolution`!]

Display content from document id 32 using db info hardcoded in snippet code

[!Evo2Evo? &id=`32` &evoTpl=`evoTpl`]

Display content from document id 32 and value from template variable id 2

[!Evo2Evo? &id=`32` &TvId=`2` &evoTpl=`evoTpl`!]

Display content from document id 32, value from image template variable id 2 and fetch image function (image will be copied from remote modx in to local folder assets/images/evo2evo)

[!Evo2Evo? &id=`32` &TvId=`2` &evoTpl=`evoTpl` &fetchimages=`1` &store_dir=`assets/images/evo2evo`!]

basic parameters

  • &db_hostname, &db_username, &db_password, &db_database = remote modx db credentials
  • &evo_url = remote modx site url
  • &evoTpl = default display template
  • &TvId = template variable id
  • &trim = trim content lenght (default 200) for short_content placeholder
  • &fetchimages = fetch remote tv image in your modx images folder (default 0 : not fetch)
  • &store_dir = folder where store remote tv images (default assets/images/evo2evo)

##tpl placeholders

  • docid = id
  • pagetitle
  • longtitle
  • description
  • alias
  • introtext
  • menutitle
  • content
  • decoded_content = html_entity_decode content
  • flat_content = strip_tags decoded_content
  • short_content = trimmed version of flat_content
  • full_content = full content with images (remote modx site url (&evo_url) is added to remote images path to avoid broken images)
  • tvvalue = value of template variable (&tvId)
  • imagetv = image template variable (&tvId)

evo2evo's People

Contributors

nicola1971 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

zlabst

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.