Download the PHP package dd/evolutioncms-snippets-ddgetparentid without Composer
On this page you can find all versions of the php package dd/evolutioncms-snippets-ddgetparentid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dd/evolutioncms-snippets-ddgetparentid
More information about dd/evolutioncms-snippets-ddgetparentid
Files in dd/evolutioncms-snippets-ddgetparentid
Download dd/evolutioncms-snippets-ddgetparentid
More information about dd/evolutioncms-snippets-ddgetparentid
Files in dd/evolutioncms-snippets-ddgetparentid
Vendor dd
Package evolutioncms-snippets-ddgetparentid
Short Description Gets document parent ID(s) of the required level.
License
Homepage https://code.divandesign.ru/modx/ddgetparentid
Package evolutioncms-snippets-ddgetparentid
Short Description Gets document parent ID(s) of the required level.
License
Homepage https://code.divandesign.ru/modx/ddgetparentid
Please rate this library. Is it a good library?
Informations about the package evolutioncms-snippets-ddgetparentid
(MODX)EvolutionCMS.snippets.ddGetParentId
Gets document parent ID(s) of the required level.
Requires
- PHP >= 5.6
- (MODX)EvolutionCMS >= 1.1
- (MODX)EvolutionCMS.libraries.ddTools >= 0.60
Installation
Using (MODX)EvolutionCMS.libraries.ddInstaller
Just run the following PHP code in your sources or Console:
- If
ddGetParentId
is not exist on your site,ddInstaller
will just install it. - If
ddGetParentId
is already exist on your site,ddInstaller
will check it version and update it if needed.
Manually
1. Elements → Snippets: Create a new snippet with the following data
- Snippet name:
ddGetParentId
. - Description:
<b>1.4</b> Gets document parent ID(s) of the required level.
. - Category:
Core
. - Parse DocBlock:
no
. - Snippet code (php): Insert content of the
ddGetParentId_snippet.php
file from the archive.
2. Elements → Manage Files
- Create a new folder
assets/snippets/ddGetParentId/
. - Extract the archive to the folder (except
ddGetParentId_snippet.php
).
Parameters description
-
id
- Desctription: Document Id.
- Valid values:
integer
- Default value:
[*id*]
(current document)
-
level
- Desctription: Parent level.
- Valid values:
1
— the immediate parent2
— the parent of the immediate parent-1
— the last parent-2
— the parent before the lastinteger
— etc
- Default value:
1
-
result_itemsNumber
- Desctription: The number of parents that will be returned.
- Valid values:
integer
'all'
- Default value:
1
-
result_itemTpl
- Desctription: Template for output.
Empty items after parsing the template will be ignored (you can calling third-party snippets in the template and set your own display conditions).
Available placeholders:[+id+]
— Parent ID.
- Valid values:
stringChunkName
string
— use inline templates starting with@CODE:
- Default value:
'@CODE:[+id+]'
- Desctription: Template for output.
-
result_itemsGlue
- Desctription: The string that combines items while rendering.
- Valid values:
string
- Default value:
''
-
result_toPlaceholder
- Desctription: Returns value to the placeholder.
- Valid values:
0
1
- Default value:
0
result_toPlaceholder_name
- Desctription: Placeholder name.
- Valid values:
string
- Default value:
'ddParent'
Examples
Run the snippet through \DDTools\Snippet::runSnippet
without DB and eval
Links
All versions of evolutioncms-snippets-ddgetparentid with dependencies
PHP Build Version
Package Version
The package dd/evolutioncms-snippets-ddgetparentid contains the following files
Loading the files please wait ....