Keywords metatag

Posted by Community Admin on 04-Aug-2018 09:25

Keywords metatag

All Replies

Posted by Community Admin on 28-Jul-2011 00:00

Currently the keywords only allow 255characters, i need to put more.I read http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/return-code-12031.aspx#1574461 and try to change the datatype to nvarchar(MAX) but mssql not allow me to change that.

Anyway to make enter more words in keywords tag? Also is there any solution to make all page have default metatag instead enter page by page?

Posted by Community Admin on 01-Aug-2011 00:00

Hello Toh,

Is this an upgraded project or a newly created one using s version of Sitefinity project manager as the one filled in for this thread (4.1.1574)? Generally there shouldn't be any problems changing the type of that column to nvarchar(MAX) in SQL Management Studio, please check if you have not applied some constraints or an active connection to the database is not blocking your attempt to modify the column. I have created a blank project usingt he same version, and the description column was set by default to nvarchar(MAX) and Allow Nulls = true, which will allow you to enter more than 255 characters for this field, and also accept null values (to prevent issues similar to the one discussed in the forum thread you linked to in your previous message). Can you please check whether the same behavior reproduces on a blank project created with Sitefinity 4.1 SP3, and if so, please do not hesitate to let us know.

Concerning your second question, you can add keywords to all pages programatically, please refer to the below code sample demonstrating how to achieve this:

var myPages = App.WorkWith().Pages()
   .Where(p => p.Page != null && p.Page.Status == ContentLifecycleStatus.Live)
   .ForEach(p =>
   
    p.Page.Keywords = "enter keywords here";
   ).SaveChanges();

 
All the best,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Aug-2011 00:00

Hi,

thanks for the reply, i believe it active connection block my attempt. I will try it later on.

regarding your sample code, how do i apply those code? create new module?
Sorry for this newbie question, i'm new to sitefinity, just learn 1 month ago.

Posted by Community Admin on 01-Aug-2011 00:00

Hi Toh,

Not a problem at all - the easiest way is to add the code inside a WebForm in your project.I have attached a sample WebForm with a textbox and a button, please add it to your project, and build it - you can then navigate to that page and type in the necessary keywords in the textbox and then click the button - the code should execute and add the keywords to all pages.

Regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed