Skip to content
  1. Extras
  2. PayAndSee
  3. Snippets
  4. pas.content

pas.content

Snippet for outputting content pas.content

Content snippet

Parameters

ParameterDefaultDescription
tplpas.contentChunk for each result row
parentsComma-separated list of parent IDs for the search. By default limited to current parent. Use 0 for no limit.
status2Subscription status
contentContent for subscriptions
limit10Maximum number of results
offsetNumber of results to skip
depth10Search depth from each parent
sortbyidSort field
sortdirASCSort direction
whereJSON-encoded string with extra conditions
showUnpublishedInclude unpublished resources
showDeletedInclude deleted resources
showHidden1Include resources hidden in menu
includeContentInclude resource "content" field
showEmptyRate1Show content with zero price
processRates1Process content cost
sortRatesHow to sort rates. JSON string, e.g. {"PasRate.cost":ASC}

Подсказка

You can also use other general pdoTools parameters

Features

The pas.content snippet, like all PayAndSee snippets, uses pdoTools. So its main parameters match pdoResources, with some differences.

Getting rates

The snippet can load rates with the processRates parameter:

fenom
{'!pas.content' | snippet: [
  'processRates' => 1,
]}

You will get a rates array in the chunk.

Placeholders

To see all available placeholders, use an empty output chunk:

fenom
<pre>
  {'!pas.content' | snippet: [
    'tpl' => '',
  ]}
</pre>

Examples

Output content from category 15:

fenom
{'!pas.content' | snippet: [
  'parents' => 15,
]}

Output with pagination:

fenom
{'!pdoPage' | snippet: [
  'element' => 'pas.content',
  'parents' => 15,
]}
{'page.nav' | placeholder}