Named a #SitecoreMVP 2018 MVP Technology

As I am writing this I am still in shock. Several years ago I was just learning and developing with Sitecore at night while working on other projects during the day. Little did I know where it would lead me. I have run several marathons and I can tell you this journey was a marathon. There were some good and rough times along my way, but I kept moving forward.

My drive to become an MVP started a year ago when I got a job with Paragon and they gave me the confidence to believe I can achieve MVP status. I talked to many MVPs this past year and they gave me a lot of helpful advice. I have met so many people in the Sitecore community this past year as well and I am excited about being more involved in the community as an MVP and making new connections. The highlights of this year have been the meetups, Slack conversations and most of all getting to attend the Sitecore Symposium in Las Vegas. So, I just want to say thank you to Paragon, all the MVPs who gave me advice, aspiring MVPs that were on the ride with me, Sitecore of course and the Sitecore community.

So now what? Well no matter what if I didn’t get awarded MVP I was going to continue doing what I am doing. I learned a lot about myself this past year. I love blogging, I really love Sitecore more than I realized before and most of all I love sharing my knowledge. If I was going to add something new I think it would be coming up with a YouTube video this year. I just need to find the right blog topic.

To see all the winners check it out here. Also congratulations to my co-worker Scott Gillis who has gotten Sitecore MVP for the second year in year in a row. You can check his blog at thecodeattic.

 

Refreshing #Sitecore Links Database for an Item and Seeing What Links to the Item

I had a client and recently a question came up on Sitecore Slack about the Sitecore link database and how you can find what items link to an item. This is one of those simple solutions that I may refer to in the future and also it may help someone else. In my client’s case they needed to know what media images linked to the item. I will keep this short and sweet. You can see my comments in the code below. Let me know if you have any questions.


Limiting #Sitecore Field Descriptions Using a Partial Class and #GlassMapper

Using a partial class to manipulate/change glass mapper model fields is common. I recently had to do this and thought this little tip for shortening descriptions fields would be come in handy for others. In this case an event listing was displayed. If the description was longer than 50 we would truncate the text and display it with the three dots at the end.

To add the partial class was simple. The key here is having the namespace the same name as you do in the generated model that Glass Mapper generated. If the namespace differs than the partial will not work since it cannot match the class you are adding additional functionality too. In my case ReSharper warns me the namespace path does not match of where I placed my partial class, but that is okay as I know it matches what is in the generated model.

This is what the partial class syntax looks like:

using System;

using Glass.Mapper.Sc;

using Glass.Mapper.Sc.Configuration.Attributes;

namespace Events.Models.sitecore.templates.Feature.Events

{

public partial class Event

{

private string _mainContentDescription;

[SitecoreField(IEventConstants.MainContentFieldName)]

public virtual string MainContentDescription

{

get

{

return _mainContentDescription;

}

set

{

ISitecoreService service = new SitecoreService(Sitecore.Context.Database);

var eventsettings = service.GetItem<EventsSettings>(Constants.Items.EventsSettings);

if (!int.TryParse(eventsettings.Text_Limit, out int textlimit))

{

textlimit = 50;

}

_mainContentDescription = value;

_mainContentDescription = !string.IsNullOrEmpty(MainContentDescription) ? TruncateAtWord(MainContentDescription, textlimit) : MainContentDescription;

}

}

public static string TruncateAtWord(string value, int length)

{

if (value == null || value.Length < length || value.IndexOf(” “, length, StringComparison.Ordinal) == -1)

return value;

return value.Substring(0, value.IndexOf(” “, length, StringComparison.Ordinal))+(“…”);

}

}

}


When we go ahead and use it in the view this is what the syntax will look like.

<div class=”desc”>@Html.Raw( Model.MainContentDescription )</div>

Your description should look something like this one done:

This is a description that I don’t want to show it…

There are many possibilities you can do with partial classes and glass mapper. In this case this saved me the time of truncating the characters in the view or creating a separate model were I would have to read the descriptions in and truncate them that way and send that model to my view for example. This is a clean and easy solution and I can use the existing generated glass model so this limits the changes I normally would have to make.

Keeping #Sitecore #SOLR Index Names Unique for Multiple Projects

One of the things I recently ran into was what should you do if you have multiple projects with the same SOLR index name. SOLR does not allow you to have the same name for an index. For instance you can’t have more than one sitecore_master_index. You will be warned and unable to if you try and create one with the same name. Also if you rebuild the indexes it will overwrite the index data for the other site you were working on. So I went on Sitecore Slack looking for help. Where Sitecorey gave me a great idea. Basically you would prefix the configuration entry core with the name of the site in each index file. See below for an example.

Your index name should reflect that name as well in the SOLR index directory.

Now this did solve the issue of having multiple indexes, but a few people on the team wanted to take it a step further. They wanted to see indexes prefixed with site name from the control panel index rebuild. So I created a config transform this time for it. Keep in mind this is always a smart idea to keep the original files safe. Basically I just replaced the id value.

From my understanding the SIM installer can also help with the prefixing of index names. I haven’t used it for that yet as my site was already installed, but in the future that is something I will consider. Let me know if you have any questions.

First Ever Milwaukee Meets Chicago #Sitecore Meetup Recap

So not sure exactly who’s idea it was, but it turned out to be a great one to combine the Milwaukee Sitecore Meetup with the Chicago Sitecore meetup. No Bears vs Packers football was discussed, just Sitecore. There must have been over 30 attendees. Coveo did the first presentation and I was honored to be part of the second presentation of Sitecore Symposium attendees. I can’t wait for the next one. So here is the recap in pictures.

I live in the far west suburbs of Chicago so driving to Kenosha, Wisconsin was about the same time as it took me to get to the Chicago meetups. I enjoyed my view of the country roads and put on some classic hard rock music.

I arrived at the venue. I have never been to the Brat Stop, but I may have to come back for a visit.


Upon arrival it was great to start meeting others in person and seeing people again that I have met at the Symposium, the Chicago meetups and even one of my co-workers in person.

Renee from American Eagle and Isabel from Coveo.

My co-worker Chad from Paragon and Joe from GeekHive.

Like I said a sizable number of attendees.

Look at that food. Not bad for not being Chicago pizza.

I always love Sitecore freebies. I do love Sitecore like the pin says.

So let’s get down to the meetup itself. It first started with all the sponsors telling a little about the company they work for. I talked about Paragon and what we did. Hopefully what I was saying made sense. I am a developer, but I always try and do my best to sell.

Coveo then did a presentation. Coveo has been a huge part of Sitecore searching/marketing and they always impress me. I can’t wait to do another project with their tools.

 

 

 

 

 

 

 

 

 

Now it was time for the Sitecore Symposium panel.

110317_1718_FirstEverMi11.jpg

We all gave our best insights and reported things we learned and brought up a lot of subjects. Mark and the audience had some great questions. This was so much fun.

So when is the next one? Not sure, but this one was so much fun. Maybe we can discuss Bears vs Packers at the next one?

Making the #Sitecore Switch from #Lucene to #SOLR with Custom Indexes

Recently I did my first conversion from Lucene to SOLR. With Lucene being phased out in Sitecore 9 this will probably be more common. You can find a lot of different installation guides in installing SOLR, but there are a few things that tripped me up that I want to prevent others from having to deal with.

Avoid Pitfalls

  • Make sure every Lucene config is disabled. Even the ones in the sub folders.
  • Make sure all the SOLR configs are enabled even the ones in the sub folders.
  • Make sure you don’t have any Cores with the same name inside the core.properties file. I had Sitecore_Master_Index in more than one file and all my Cores would disappear every time I restarted until I corrected the name.

Custom Indexes Differences

Some of this is obvious as you can replace Lucene with Solr, but some were not so obvious to me and I had to do some research and ask for help. I highlighted the less obvious ones.

From this:

<index
id=acme_widgetgroups_index” type=Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider>

To this:

<index
id=acme_widgetgroups_index” type=Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider>

From this:

<configuration
ref=contentSearch/indexConfigurations/defaultLuceneIndexConfiguration>

To this:

<configuration
ref=contentSearch/indexConfigurations/defaultSolrIndexConfiguration>

From this:

<fieldMap
type=Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch>

To this:

<fieldMap
ref=contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap>

From this:

<field fieldName=widgetfilters” storageType=YES” indexType=TOKENIZED” vectorType=NO” boost=1f” type=System.String” settingType=Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider />

To this:

<field fieldName=widgetfilters” returnType=string />

From this:

<documentOptions
type=Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilderOptions, Sitecore.ContentSearch.LuceneProvider>

To this:

<documentOptions
type=Sitecore.ContentSearch.SolrProvider.SolrDocumentBuilderOptions, Sitecore.ContentSearch.SolrProvider>

I hope this helps you as you do your conversion. If you have any questions, feel free to ask.

#Sitecore Symposium Day 4 #SitecoreSYM @ParagonDev

Well final day is done and I am sitting at the airport. To say that I am truly blessed to have the opportunity to be part of the Sitecore Symposium is an understatement. I am so glad Paragon Consulting chose me to attend. I have a lot to learn about the new features of Sitecore, but that is my passion and I can’t wait to dive in. So just like the other posts here is my day in pictures.

I don’t do these pics ever, but I also don’t get this fancy because I am always coding.

It might not be web development, but there is a lot you can learn about marketing and utilize as you develop websites.

Did someone say headless? That is going to be so cool

Putting this here so I can actually read it.

Where is Rob?

There he is.

I always test my code. I am not kidding.

Well this had to finally come off, but I may still wear it from time to time.

See you next year?????

Sitecore Symposium Day 3 #SitecoreSYM @ParagonDev

In the city that never sleeps it was a great day from sunup to sunrise. I still can’t get over how awesome this event has been and how I look forward to the future with Sitecore. So here we go. My day in pictures.

First a run to start out the day. I ran into one of my coworkers and I followed her as she ran super-fast. Never thought I could run that fast feeling still full of last night’s dinner.

One of the best seminars I have heard about marketing. Lots of important information. We all have work to do.

This guy is hilarious. Always good to mix comedy with anything.

Keep on learning…

Thanks Paragon for providing lunch.

More learning. This time the Data Exchange Framework. My little area of expertise.

Scott Anderson Chief Marketing Officer of Sitecore. A big celebrity for us.

Mark Hamill is in the house. One of the greatest moments ever. What a great guy.

Finishing the night at the Omni.

Something you don’t see everyday.

On to day 4 and back home.

Sitecore Symposium Day 2 #SitecoreSYM #ParagonDev

I am writing this late at night. It has been a busy day. Some pictures below. Having an awesome day and learning and meeting so many in the Sitecore world.

A little early morning run to start the day.

#VegasStrong

My new developer running buddy from GeekHive.

Mark Frost CEO opening up the Sitecore Symposium.

A development track might be better than a running track.

Bloody Mary in the morning? Tomato juice and coffee go well together.

The Sitecore guru himself Kamruz.

Keep on learning.

I love dessert.

Sitecore Mints!!! My breath smelled like mints and great websites.

Keep on learning…

Paragon and our little microbrews.

Closeup because why not?

Dinner time. Italian family style.

Goodnight!

Sitecore Symposium Day 1 #SitecoreSYM #ParagonDev

First day of the Sitecore Symposium I am in awe. It was great to meet people I talk to virtually, catch up with current coworkers, old coworkers and meet new people. So here is Day 1 in pictures.

Is my head really that big? Seen at the baggage area of the airport.

Paragon developers meet Marilyn Monroe. Maybe she needs a Sitecore site?

If you close your eyes and go back to the 50s these guys were good. It was the 50s right?

I can’t take Darth Vader in a Jedi fight, but pretty sure I can beat him in a race.

This drink was called cloud 9. No alcohol, but it was good. Loved licking the sugar from the side.

Sitecore development would be super hard without Hedgehog software. I am taking one of the babies home with me.

Room with a view.

No white tiger sightings yet.

Good night. Going running in the morning and then learning lots of things during the day.