Comment about getting random content
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- documentation
Research direction
Start with the templatetags documentation page at https://docs.bolt.cm/templatetags and review the existing random-content examples. Document that fetching one record requires the returnsingle option, using the example from the issue. Done means the page clearly explains the single-record behavior alongside the existing query examples.
Written by the indexing model from the issue text.
Description
The docs page on https://docs.bolt.cm/templatetags gives a list of example queries, i.e. this one:
quote/random/5 - get 5 random quotes
But if you want to show just one, you'd think you can do this:
quote/random/1
That's not the case. If you want to fetch just one record, you have to do something like this:
{% setcontent myrecord = 'myrecord/random/1' returnsingle %}
The 'returnsingle' has to be used when fetching a single record in this example.
In my opinion this needs to be mentioned in the docs. :)
- Dominant language
- PHP
- Stars
- 45
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bolt/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Outdated Roadmap link in `https://docs.boltcms.io/other/contributing#step-2-rfc-moved-to-roadmap` Open
Difficulty 1/5 Under an hour Newbie friendliness 50/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·