Downloads » Resources » GetChunkTemplate

GetChunkTemplate

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Votes: 2

GetChunkTemplate 0.1

Works with MODx Version(s): 0.9.6
Submitted: May 15th 2008 | License: GPL - GNU Public | Downloads: 147

Get Specific Chunk Content, depending current Template used.

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.

Previous Releases



Extras

No results found.


( back to top )