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, ...Skin Custom tokens ? Skin Custom tokens ?
Previous
 
Next
New Post
11/15/2007 10:39 AM
 

Hi,

I got a ? . when creating a skin file we can only use DNN predefined tokens in the .html file. They generate tags for skin in the .ascx files and correct mapping to user control files in the /admin/skin folder. like links.ascx, banner.ascx file. Now why can't i specify my own token or define something in the database. I am not sure if it's possible. Like creating a customLinks.ascs file that only shows links with description= "Top Menu" rather than displaying all active links.

Asif 

 
New Post
11/15/2007 11:35 AM
 

you can use the skin.xml file here is an example i used for the privacy token. The custom class is called footerLinks

skin.css

A.footerLinks, A.footerLinks:link, A.footerLinks:visited, A.footerLinks:active
{   
    font-weight: normal;
    font-size: 10px;
    color: #444444;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    text-decoration: none;   
}
A.footerLinks:hover
{
        text-decoration: underline;
}

skin.xml

<Objects>
 <Object>
    <Token>[PRIVACY]</Token>
    <Settings>
      <Setting>
        <Name>CssClass</Name>
        <Value>footerLinks</Value>
      </Setting>
    </Settings>
  </Object>
</Objects>

 
New Post
11/15/2007 11:46 AM
 

As MaxPower eluded to, you can indeed create your own tokens.  The actual control that the token is replaced with is called a Skin Object, and creating a skin object can be very similar to creating a module, but your manifest file has a few different elements in it.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
11/15/2007 12:37 PM
 

thanks for your reply Max.  you are taking about attributes of token that can be defined in the .xml file. How about if i have [MYLINK] token defined in the .html file and upon paring when DNN generates .ascx file i want this token to map to /admin/skins/MyLink.ascx file.

Lets take [LINKS] token, this is what you get in the .ascx file upon parsing. look at the source for this tag ,  i can only define attributes of the tag in skin.xml file not the source of this tag.

<%@ Register TagPrefix="dnn" TagName="LINKS" Src="~/Admin/Skins/Links.ascx" %>

"<dnn:LINKS runat="server" id="dnnLINKS" />" 

 

in the same way this is want i want parser to produce upon parsing

 

<%@ Register TagPrefix="dnn" TagName="MYLINKS" Src="~/Admin/Skins/MYLinks.ascx" %>

"<dnn:MYLINKS runat="server" id="dnnLINKS" />" 

 

I HOPE THAT EXPAINS WHAT I WANTS TO KNOW. 

 
New Post
11/15/2007 1:21 PM
 

you would have to create your own skinobject, create an installation package and install it in your dnn installation.

for some more info on how to create a skinobject, see this (old) link: http://www.wwwcoder.com/tabid/68/type/art/parentid/224/site/6373/default.aspx

Also, the dnn skinning guide contains some (old) referernce to creating your own skinobject. I will try at least writing a blog soon about this subject.. some info seems to be missing here.


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Skin Custom tokens ? Skin Custom tokens ?


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