This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfexecute name="C:\download\WinScp\winscp.com" arguments="/command ""open sftp://user:pass@yourserver.com"" ""put c:\full\path\to\file.txt /usr/local/remote/dir/"" ""exit""" variable="result" errorvariable="errorv" timeout="10"></cfexecute> | |
<cfoutput> | |
<cfif len(errorv)> | |
<h1>Error</h1> | |
<pre>#errorv#</pre> | |
<cfelse> | |
<h1>Result</h1> | |
<pre>#result#</pre> | |
</cfif> | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery("a[href$='.pdf']:not(.btn)").after(" <i class=\"icon-file-text-alt\"></i>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery("a[href*='/Secure/']:not(.btn)").after(" <i class=\"icon-lock\"></i>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery().ready(function() { | |
// content here | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[datetime]$archivedDate = [datetime]::Today.AddDays(-1) | |
Write-Host "Restoring items recycled after $($archivedDate.ToShortDateString())" | |
foreach($archive in Get-Archive -Name "recyclebin") { | |
Write-Host " - Found $($archive.GetEntryCount()) entries" | |
$entries = $archive.GetEntries(0, $archive.GetEntryCount()) | |
foreach($entry in $entries) { | |
if($entry.ArchiveLocalDate -ge $archivedDate) { | |
Write-Host "Restoring item: $($entry.OriginalLocation) {$($entry.ArchivalId)}on date $($entry.ArchiveLocalDate)" | |
$archive.RestoreItem($entry.ArchivalId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$folders = Get-ChildItem "C:\data\sites\test.local\Data\serializationps\master\sitecore\media library\Images" -recurse | ?{ $_.PSIsContainer } | |
$folders | Import-Item -root "C:\data\sites\test.local\Data\serializationps\" -DisableEvents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// note this works for Sitecore 8.2 Experience Editor edit mode; no other versions or variations tested | |
// highly inspired and updated from https://mattneil.co.uk/2016/12/08/detect-sitecore-page-modes/ | |
var isSitecoreEditing = function() { return !!(Sitecore && Sitecore.WebEditSettings && Sitecore.WebEditSettings.editing); }; | |
if (isSitecoreEditing()) { | |
// in Sitecore editing mode | |
} else { | |
// not in Sitecore editing mode | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -not -path '*/\.*' -printf '%TY.%Tm.%Td %THh%TM %Ta %p\n' |sort -n|less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ItemViewModel GetFirstItemViewModel(this DynamicContentListViewModel listModel) | |
{ | |
ItemViewModel item = null; | |
if (listModel.Items.Any()) | |
{ | |
item = listModel.Items.First(); | |
} | |
return item; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Telerik.Sitefinity.Modules.News; | |
using Telerik.Sitefinity.News.Model; | |
public void ChangeNewsDate() | |
{ | |
// https://www.progress.com/blogs/how_to_publish_content_items_in_the_past | |
// https://www.progress.com/documentation/sitefinity-cms/for-developers-modify-news-items | |
var pubDate = new DateTime(2019, 02, 25); | |
var manager = NewsManager.GetManager(); | |
//var item = manager.GetNewsItem(new Guid("6aa1dc9a-58ad-45e5-b624-fe5e8267728a")); |
OlderNewer