GetChunkTemplate
Votes: 22
Tags: Administration, snippet, template chunktemplate
Submitted: May 15, 2008
Released: May 15, 2008
Downloads: 357
License: GPL - GNU Public
Package Website
GetChunkTemplate 0.1
Works with the following Version(s): 0.9.6
Get Specific Chunk Content, depending current Template used.
Download
- repo-2033.txt (357 downloads)
Description
This snippet returns the contant of the Chunk whose name is build from the concatenation of the name of the current template and the parameter chunk, separated by the underscor character: "'currentTemplateName'_'paramChunkValue'". If this chunk does not exist the snippet try to return the content of a potential default Chunk: "default_'paramChunkValue'" or "'paramChunkValue'". Otherwise "" is returned: no chunk is used.
More information on this french post:
http://www.fabienletort.com/blog/2008/modx-snippet-getchunktemplate.html
Flowchart of a call:
Instructions
Create a new Snippet:
- Name: GetChunkTemplate
- Description: <strong>0.1</strong> - Get Specific Chunk Content, depending current Template used.
- Copy the content of the txt file in the Snippet Source Code.




Please login to comment.