<![CDATA[ Snippet Properties - My Forums]]> https://forums.modx.com/thread/?thread=33432 <![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183956 sottwell Jul 29, 2005, 10:52 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183956 <![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183955
did you save the snippet after making the changes?

]]>
xwisdom Jul 29, 2005, 10:27 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183955
<![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183954 ]]> sottwell Jul 29, 2005, 10:23 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183954 <![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183953 Consider this:

&name=Name;string;

The above will default to an empty string for $name

Now consider this:

&name=Name;string;mary

The above will now default to mary for $name

]]>
xwisdom Jul 29, 2005, 10:21 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183953
<![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183952 sottwell Jul 29, 2005, 10:14 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183952 <![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183951 sottwell Jul 29, 2005, 10:04 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183951 <![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183950 Quote from: sottwell at Jul 29, 2005, 02:57 PM

So I can’t do like so: &id=Folder ID;int;$modx->documentIdentifier

Another dumb question:? How do I do more than one?? All in the same input field, separated by? ... ?

no, you can’t do this:

&id=Folder ID;int;$modx->documentIdentifier

but you can do this:

&id=Folder ID;int;0

where $id will then be passed with the value 0

For multiple properties just separate them using a space:

&id=Folder Id;int;0 &name=Name;string &color=Color;string;#FFCC00]]>
xwisdom Jul 29, 2005, 10:03 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183950
<![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183949
Another dumb question: How do I do more than one? All in the same input field, separated by ... ?]]>
sottwell Jul 29, 2005, 09:57 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183949
<![CDATA[Re: Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183948
The $modx->docmentIdentifier is a property of the MODx DocumentParer class and cannot not be replaced my default properties]]>
xwisdom Jul 29, 2005, 09:52 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183948
<![CDATA[Snippet Properties]]> https://forums.modx.com/thread/33432/snippet-properties#dis-post-183947
Starting with line 19 we find:
$id = !isset($id)?$modx->documentIdentifier:$id;
$depth = !isset($depth)?0:$depth;
$nodiv = !isset($nodiv)?false:$nodiv;
$sDivId = empty($divId)?"":" id='$divId'";
$sDivClass = empty($divClass)?"":" class='$divClass'";
$sUlClass = empty($ulClass)?"":" class='$ulClass'";
$sLiClass = empty($liClass)?"":" class='$liClass'";
$sActiveLinkClass = empty($activeLinkClass)?"":" class='$activeLinkClass'";


If I understand correctly, these lines would all be removed, and these default values would be put in the Properties form instead? Will the $modx->documentIdentifier work the same in this case?]]>
sottwell Jul 29, 2005, 09:37 AM https://forums.modx.com/thread/33432/snippet-properties#dis-post-183947