Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Styling breadcrumb and search boxStyling breadcrumb and search box
Previous
 
Next
New Post
4/25/2009 9:29 PM
 

Folks, I'm having trouble with skinning a few items in my design.  See below:

First off is the search box.  See my design.  It has a styled text input, styled button.  But I can't see how to style the search box this way with the skinning doc.

Second is the breadcrumb.  It is also highly styled, with custom end caps, backgrounds, dividers and hovers.  I don't see how to style the breadcrumb control this way, either.  Is this possible with the included controls?  If not, where should I look for alternates?

Thanks.

AldenG

 
New Post
4/26/2009 4:32 AM
 

 The Breadcrumb has some attributes and also needs setting a class to it and describ it in skin.css

<Object>

<Token>[BREADCRUMB]</Token>

<Settings>

<Setting>

<Name>RootLevel</Name>

<Value>0</Value>

</Setting>

<Setting>

<Name>Separator</Name>

<Value><![CDATA[&nbsp;>&nbsp;]]></Value>

</Setting>

<Setting>

<Name>CssClass</Name>

<Value>breadcrumb</Value>

</Setting>

</Settings>

and for search the show attributes will switch off the google site bit and then you can style it as necessary in skin.css with below example

<Token>[SEARCH]</Token>

<Settings>

<Setting>

<Name>CssClass</Name>

<Value>search</Value>

</Setting>

<Setting>

<Name>showWeb</Name>

<Value>False</Value>

</Setting>

<Setting>

<Name>showsite</Name>

<Value>False</Value>

</Setting>

You also need to wrap the search div with a css overide to change the search input style.

Salar

 
New Post
4/26/2009 11:00 AM
 

Thanks Salaro.

The designer gave me the following CSS for the search box:

/* form search */
#header #form-search {
    position:absolute;
    top:83px;
    right:0;
}
#header #form-search label { display:none;}
#header #form-search .text {
    float:left;
    background:url(images/bg-input.gif) no-repeat;
    height:34px;
    overflow:hidden;
    padding:0 15px;
}
#header #form-search .text input {
    width:140px;
    padding:8px 0 5px;
    background:none;
    border:0;
    color:#4f4f4f;
}
#header #form-search .text input:focus { outline:none;}
#header #form-search .btn {
    float:left;
    background:url(images/btn-search.gif) no-repeat;
    width:70px;
    height:34px;
    border:0;
    cursor:pointer;
}
#header #form-search .hovered {
    background:url(images/btn-search-hover.gif) no-repeat;
}
#header #form-search .clicked {
    background:url(images/btn-search-click.gif) no-repeat;
}

With the following markup:

            <!-- form search -->
            <form action="#">
                <fieldset>
                    <div id="form-search">
                        <label for="text">&nbsp;</label>
                        <div class="text"><input id="text" type="text" value="Text Example" /></div>
                        <input class="btn" type="button" alt="search" />
                    </div>
                </fieldset>
            </form>

So are you suggesting all I need to do is convert the "form-search" ID to a class, pass that to the seach control?  I don't see how to inject my own markup that will use that class properly.  I guess that's the root of my problem for both controls -- getting my own markup in there.  For the menu I solved this by using the Snapsis menu, which provides a template for my own markup and worked like a snap.

BTW, I'm on DNN5, so no skin.xml for me ;-)

AldenG

 
New Post
4/26/2009 12:11 PM
 

 

Alden,

If you're on DNN 5, you'll need this:

<div id="form-search">
      <object id="dnnSEARCH" codetype="dotnetnuke/server" codebase="SEARCH">
            <para name="CssClass" value="your-css-class" />
      </object>
</div>

The you can use either #form-search or .your-css-class to style the search control via its html elements.

Hope this helps!


Cuong Dang
Co-founder: Enliven, dnnGallery
LinkedIn | Twitter
I'm the author of DNN and Web Standards Wrox Blox

 
New Post
4/26/2009 6:50 PM
 

Thanks everyone for your helpful advice.  It has helped me get further, but not over my fundamental problem.  Here's a much more concrete example.  Applying everyone's suggestions, I get markup as follows:

<div class="form-search">
   <span id="dnn_dnnSEARCH_ClassicSearch">
     <input name="dnn$dnnSEARCH$txtSearch" type="text" maxlength="255" size="20" id="dnn_dnnSEARCH_txtSearch" class="NormalTextBox" onkeydown="return __dnn_KeyDown('13', ' __doPostBack(%27dnn$dnnSEARCH$cmdSearch%27,%27%27)', event);" />&nbsp;
     <a id="dnn_dnnSEARCH_cmdSearch" class="SkinObject" href=" __doPostBack('dnn$dnnSEARCH$cmdSearch','')">Search</a>
  </span>

</div>

The "form-search" div comes from my stylesheet., which places the search box in an absolute position in the header.  But look closer at these styles.

This one positions the background image that pretends to be an input box.  This is how it gets its styled look in the screenshot I have in the first post.

#header .form-search .text {
    float:left;
    background:url(images/bg-input.gif) no-repeat;
    height:34px;
    overflow:hidden;
    padding:0 15px;
}

And this one positions the actual text input within the image of the box, so when you click on it, you get a live input box.

#header .form-search .text input {
    width:140px;
    padding:8px 0 5px;
    background:none;
    border:0;
    color:#4f4f4f;
}

But the DNN markup only gives me one class for the text box: "NormalTextBox."  I need to apply classes to two elements here (the image and the text input) and I only get one class in the markup.  To make markup that will work with these styles, it needs to be:

 <div class="text"><input name="dnn$dnnSEARCH$txtSearch" type="text" maxlength="255" size="20" id="dnn_dnnSEARCH_txtSearch"  onkeydown="return __dnn_KeyDown('13', ' __doPostBack(%27dnn$dnnSEARCH$cmdSearch%27,%27%27)', event);" /></div>

That would get my 2 classes applied, but I can't see how to insert that <div> inside the DNN-generated markup.

I've run into this problem at least a dozen times, now.  I'm sure if I crack this, it will help me with skinning all of the DNN controls.

Thanks for everyone's help.

AldenG

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Styling breadcrumb and search boxStyling breadcrumb and search box


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out