Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Textbox width in admin

Vote:
 

Hi i would like to increase the width of the Name Textbox in admin.

Is this possible and how do i do it?

I wrote some css in the sleek.css for the width and it worked but i want to use another approch, a better approch, because if some time theres an update on episervers sleek.css my css will get removed, so how should i do?

How do i increase the width or height in Admin under a node Name textbox?

Thanks in advance

#87344
Jun 11, 2014 7:38
Vote:
 

Changing a third party resource (such as a .css file in EPiServer) is never a good idea and you describe the main reason.

It sounds like you managed to change the size, except that your change was made in the sleek.css file?

You can add this to a custom .css file and register it as a module.

Read more about modules on http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-Framework/7/Configuration/Configuring-moduleconfig/

A quite simple example of this is the module.config in a sample Alloy Templates

#87349
Jun 11, 2014 10:28
Vote:
 

Hey, are you talking about admin or edit mode? 

If you are talking about admin mode, which Name Textbox do you think of?

If you are talking about edit mode and the content Name, you might consider using an editor descriptor:

using System;
using System.Collections.Generic;
using EPiServer.Shell.ObjectEditing;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;

namespace PROJECT.Web.Business.Edit.EditorDescriptors
{
    [EditorDescriptorRegistration(TargetType = typeof(string))]
    public class StringEditorDescriptor : EditorDescriptor
    {
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
            base.ModifyMetadata(metadata, attributes);

            if (metadata.PropertyName == "icontent_name")
            {
                metadata.EditorConfiguration.Add("style", "width: 1500px");
            }
        }
    }
}

This is the code for EPi 7.5, so might be that some namespaces are different for version 7.

#87350
Jun 11, 2014 10:30
Vote:
 

Thanks for the fast respond.

I will reply if i have further question around this topic, in the mean time, thanks.

#87353
Jun 11, 2014 11:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.