Mura CMS 7 - Getting publish date of page from iterator? - coldfusion

I have a local index that is pointing to a calendar, and grabbing the 4 most recent calendar entries. I have an iterator iterating over each of these items and outputting them via some custom markup. I can easily grab the title of the current item using:
#item.getTitle()#
But I'm unsure of how to grab the publish date that was set on the item. How do I accomplish that?

There a few dates that you can access.
// this would need to be explicitly set when editing the content node
item.get('releaseDate');
// This is when the first version was initially created
item.get('created');
// This is slightly mis-labelled. It's when this actually version was saved
item.get('lastUpdate');

Related

Update Sharepoint All list items using powershell

I have a list with 10,000 which uses a Nintex form. I have added a calculated column(Connected to a list column) on the form which gets the value based on other sql request field on the form. All new items will be having the calculated column value.
Is there a way I can update all the list items with the value from the form.
I know you can update the list items using powershell, but you need to have value to update it with.
If you open the existing form and save it without doing anything it takes effect, but I cannot open 10,000 items for it to take effect.
Is there any easy way to do this?
You oucld use powershell to update the list items, you don't need to have value to update it with.
Below code for your reference:
$web=get-spweb http://yoursite
$list=$web.lists['ListName']
$items=$list.items
foreach($item in $items){
$item.update()
}

Mura CMS - Access Local Index items programmatically

I have created a local index for the purpose of user being able to upload images for an image gallery. I just want to be able to access the images from within that local index, but can't work out how to access the contents of the local index.
I have been able to get the index with: $.getBean("feedManager").read('F78748AB-BADD-5E7F-86890BE17C0E11E8').
With this, I can see the appropriate properties for the local index, however I can't see, nor find a way to access the content items within that feed. In particular, I just want to be able to get to the related image for each item.
I am able to view the items via the RSS feed.
Many Thanks in advance for any pointers.
Jason
feed = $.getBean("feedManager").read('F78748AB-BADD-5E7F-86890BE17C0E11E8')
Your code returns you the feedBean for your local index. The next step is to ask the feedBean for the content. The content can be returned in two formats: a Query object or an Iterator.
Query:
feed.getQuery();
Iterator:
feed.getIterator();
If you ask for the query format you can loop over it using the 'cfloop'-tag with the 'query'-attribute.
If you ask for the iterator this documentation will help you looping over an iterator in Mura (the documentation if for a content iterator, but the concept is the same):
http://docs.getmura.com/developer-guides/back-end-development/content-iterator/

Sitecore Advanced Database Crawler index is populated with deleted items over newly created items

I have a Sitecore Advanced Database Crawler index in Sitecore 6.5 which shows strange behavior.
I use the index to index product-items and have the following structure in my Sitecore content
tree:
/Products/Category/Product1
./Product2
./Product3
Every night an import process runs that removes the item /Category/ and all of its descendants and creates a new item (with new Guids) with underlying products.
The products are mostly the same every day, only a few are added or removed.
The rootPath of my ADC index is set to /Products/Category/
After the import a publish is done on the /Products/ item and all its descendants.
So far so good. But I noticed that after the publish, the ADC index is modified but when I open the page that is supposed to display the products, I have no products.
When I use Luke to open the index, I have only "Deleted" documents in my index.
I checked the HistoryTable of the Web-database and it includes records for the deleted products as well as the newly created products.
The IndexingProvider_LastUpdate timestamp in the web-database is later than the most recent record in the historytable.
It seems like the ADC/Lucene index takes the Deleted items over the Created items and uses the Path instead of the ID to determine which item is the most recent.
When I manualy do a full-publish of the /Category/ item and it's descendants after the import, the index will get modified again and then the product items are back as normal items in the index and on the webpage.
What is going wrong here and how can this be resolved?
I noticed that my index is pointing to /Products/Category/ and during import the /Category/ item is removed and re-created. Changing the index path to /Products/ seems to resolve the issue.
Somehow the Index Crawler gets stuck when the index startingpoint is removed and recreated.

How to update (not overwrite) a multiple choice lookup field using updatelistitems

I have a list in sharepoint foundation. Each item has a field which is of type lookup. A user can select multiple values in this field.
Some items already have values selected in this field. I would like to update a number of items using the updatelistitems call in the Lists web service. Whenever I update an item though, the new value overwrites the existing value in this field instead of appending to it.
Is there a way to append the new value?
Thanks
You need to first retrieve the selected values of these fields and hold in a collection and then merge with your new values and update back to the field...

I have a field in APEX set with a default of SYSDATE but it does not update

I have a field defined in my table as DATE and want it to automatically populate with the current system date when someone access the update form in my APEX application. But the date doesn't update. It was working when I first added it, but now when you pull up the update page it only shows the date that's in the table.
In Oracle, a default on a column means that if a record is inserted into the table without mentioning that field, then use the default. My guess is that since the field is displayed on your page, you are writing NULL or spaces to it, so it is definitely included in the insert statement.
So you need to either take it off the page, add an update trigger, or even better, write a process in Apex to update it whenever the record is modified -- perhaps an After-Submit computation.