GithubHelp home page GithubHelp logo

Comments (6)

brandonkelly avatar brandonkelly commented on August 16, 2024

Just added a quick note about it on the Global Variables page.

As far as craft.app examples go, the plan is that we will start adding Twig examples to the service methods, and style the class reference more like API documentation (like https://docs.api.craftcms.com/), where code examples are displayed off to the right, and you can choose whether you want to view code examples in PHP or Twig.

from docs.

narration-sd avatar narration-sd commented on August 16, 2024

that sounds a really good idea, especially as it will mean more useful documentation, as notes from both coding methods will be merged...also less work...

from docs.

carlcs avatar carlcs commented on August 16, 2024

Copy from a discussion on Slack:

Craft 2 only made a few of its service functions available in Twig, and all of them were nicely documented in the templating part of the docs where most of them came with nice examples to get you started quickly.

In 3 you now have access to all of Craft’s service functions via craft.app, and all of them are documented in the Class Reference already. I understand that it’s not really practical to have all functions documented in a second place, and it probably wouldn’t even help much because what I think is the most significant difference to Craft 2 docs of craft.request etc is compactness. Only the most usefull templating functions were documented, because more weren’t even available for use. This gave a nice overview of what you can do in Twig which is now lost and a real issue especially for beginners.

from docs.

brandonkelly avatar brandonkelly commented on August 16, 2024

Fair point.

from docs.

paul-frost avatar paul-frost commented on August 16, 2024

I've just been pointed to this after getting help on Slack with segments.
I'd just like to re-iterate how the lack of real world examples in the documentation is making Craft 3 a really negative experience. I'm not a beginner but I'm also not a programmer. I keep hitting issues that I can't work out myself. I hate having to ask on SE or Slack how to do what seem such simple things. I search through SE threads trying all combinations of search questions and then usually find they refer to Craft 2.

from docs.

brandonkelly avatar brandonkelly commented on August 16, 2024

@paul-frost Thanks, we’re working on it.

from docs.

Related Issues (20)

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.