Comments (6)
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.
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.
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 ofcraft.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.
Fair point.
from docs.
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.
@paul-frost Thanks, we’re working on it.
from docs.
Related Issues (20)
- [Content]: Search/Preview Descriptions
- [Content]: Extend > Utilities opening section is incomplete
- [Content]: "Adding validation rules" - Add code example for entries HOT 1
- [Content]: `pcntl` Usage in Daemonized Queue
- [Bug]: Query parameters missing from page HOT 1
- [Content]: Keyboard Shortcuts
- [Content]: Updating plugins document refers to Craft 4 instead of Craft 5 HOT 2
- [Content]: Extending Craft — Field Layout Elements
- [Bug]: Links to craft fields missing slash - broken link HOT 1
- Testing broken URL issue template!
- 404 Page HOT 1
- Environment Variabales link broken on General Settings Page
- https://craftcms.com/docs/5.x/sites.html#static-message-translations
- docs broken link (source https://craftcms.com/docs/5.x/reference/field-types/date-time.html) HOT 1
- Database configuration link is broken
- "check out Extending Craft." Link is broken
- Links in Next Steps are broken
- Deployment link in docs appears broken for 5.x
- [Broken Link]: Changelog link in Craft 5 Upgrade page leads to 404 on github HOT 1
- [Content]: Manually attaching behaviors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.