Sign In  |  Register
 
 
DotNetNuke Support Forums
DotNetNuke Tokens: Some tricks for getting more than SkinPath in your skin.
Last Post 01 Apr 2010 08:28 AM by bogdanl. 89 Replies.
Printer Friendly
Sort:
PrevPrevNextNext
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 4 of 5 << < 12345 > >>
AuthorMessages
visionweaver
New Member
New Member
Send Private Message
Posts:4

--
21 Mar 2008 04:08 PM  

I have a similar question to this one. If I wanted to include the page's (tab's) description on the page just under the title, what would the token be? I am guessing that it is <%=PortalSettings.ActiveTab.Description %>. Is that correct?

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
21 Mar 2008 04:28 PM  

Yes, PortalSettings.ActiveTab.Description is a valid property.

griederm
New Member
New Member
Send Private Message
Posts:4

--
26 Mar 2008 08:36 AM  

Hi John,

I use the Snapsis NavMenu and localized it with the Apollo PageLocalization module. Now, I would like to output the top-level navigation item name. I tried the following:

<%=PortalSettings.ActiveTab.BreadCrumbs(0).TabName%>

...but this always returns the name in the language, i originally entered. How to output the localized (translated) value for the currently selected language?

Cheers,
Marcel

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
26 Mar 2008 01:24 PM  
Hi Marcel,
The BreadCrumbs are not translated, but something like this may work:

<%= CType(PortalSettings.DesktopTabs(0),DotNetNuke.Entities.Tabs.TabInfo).TabName %>

Otherwise I would look for a special Breadcrumb that can be translated. I think Apollo does one.
griederm
New Member
New Member
Send Private Message
Posts:4

--
27 Mar 2008 07:11 AM  

Hi John,

Thanks for your answer.
Actually, all i wanted to do was to return the current 1st level menu item (localized) name, which would always be the first entry in a breadcrumb navigation.

For instance with the menu structure:

Home
Products
- Software
- Hardware
About Us
- Jobs

On the page "Hardware", it should return the string "Products" in the current language. Is this possible?

Cheers,
Marcel

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
27 Mar 2008 02:45 PM  
You should probably get a localizeable Breadcrumb SkinObject to do that. I've been trying to figure out a way to do it, and all I can come up with would take a lot of code. Erik, who does the Apollo PageLocalization module may have a way to do it, and I think he has a module called MLBreadcrumb.
schotman
New Member
New Member
Send Private Message
Posts:26

--
10 Apr 2008 07:25 AM  

Yes, MLbreadcrumb, is just the localized version of the normal breadcrumb skinobject.

Peter

jimmyz
New Member
New Member
Send Private Message
Posts:1

--
19 May 2008 10:05 PM  

This is very helpful with skin development...

<%=PortalSettings.ActiveTab.BreadCrumbs (PortalSettings.ActiveTab.Level - 1).TabName %>

Is there a way to get that call to work within a container skin file?  I would like a container to show the parent tab name as well as the title of the module itself... This of course throws the error:

"error BC30469: Reference to a non-shared member requires an object reference...."

lneville
Basic Member
Basic Member
Send Private Message
Posts:120

--
28 Jul 2008 03:43 PM  
This has been very useful, thanks. I can now throw away all those skin objects Iwrote to do simple things like return a link to the Home page, Users page etc!

Slightly off topic, but I am now trying to use a similar technique to alter the HTML of my skin depending on whether or not a particular pane has any modules in it (for background see here - http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/109/threadid/244866/scope/posts/Default.aspx).

Here's what my code would look like conceptually (this doesn't work in reality):

class='<%= IIF(PortalSettings.ActiveTab.Panes("RightPane").modules.count=0, "WideContentPane", "NarrowContentPane") %>'

It doesn't seem possible to get any reference to a pane through PortalSettings.ActiveTab. Is there some way this can be done you know of?
SnapsisHost
Basic Member
Basic Member
Send Private Message
Posts:243
Avatar

--
28 Jul 2008 04:20 PM  

You can't get the module count for a pane that easily.

Having dynamic width panes with a minimum width is why I advocate using one table for pane layout Which is basically what Tim was saying in that other thread by suggesting display:table-cell

You could also try the :empty pseudo-class, but it is a new concept and may not work depending on what you have in your skin.

As long as your content is fluid (no widths or nbsp;) then it will not flow outside of a floated div.
But we all know that cannot be guaranteed with a modular CMS like DNN.

Here is a link that may help explain what you are dealing with:
http://gtwebdev.com/workshop/floats/enclosing-floats.php

Honestly though, it is not a sin to have a table in your skin!

lneville
Basic Member
Basic Member
Send Private Message
Posts:120

--
30 Jul 2008 06:13 PM  

I followed your recommendation - mostly the skin is still DIVs, but there's now a table in the middle to hold the panes. It felt wrong - but it works sooooo well! Thanks!

If you have time, could you take a look at this post: Vertical, bulleted, indented list menu ?

dax
New Member
New Member
Send Private Message
Posts:6

--
01 Sep 2008 06:20 PM  
Is there a way to tell in the skin that you are in Admin mode? I don't mean an administrator. I mean that the skin is in admin mode on the module you are using.

Dax
John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
01 Sep 2008 06:31 PM  
Anytime there is a querystring parameter on the request of "ctl" then you are in admin mode.

So you could do something like :
Dim adminMode as boolean = Not IsNothing(Request.QueryString("ctl"))

beno
New Member
New Member
Send Private Message
Posts:2

--
05 Sep 2008 05:12 AM  

Hey John,

Nice thread has helped me a lot in my portal development

Is there a way to check what locale the portal is in within the skin? I want to swap the image for a contact us button.

By the way your css navmenu has saved my life...

beno
New Member
New Member
Send Private Message
Posts:2

--
05 Sep 2008 05:53 AM  

John don't worry seems i have found the MLSkinHelper and that allows me to to put in key=value pairs depending on the locale....

Clever stuff this dotnetnuke

ConnyG
New Member
New Member
Send Private Message
Posts:5

--
19 Sep 2008 07:09 AM  

Hi

Thanks for this usefull input. But I have the same problem like jimmyz: I cannot use this tokens in a container skin-file. Does this not work? It does not load my container skin file and takes the standard container file.

Thanks for your response.
Cornelia

 

pspeth
New Member
New Member
Send Private Message
Posts:22

--
26 Sep 2008 12:19 PM  

Our skin uses a background photo.

What I would like to do specify different photos for different pages or groups of pages

So for example, all City Clerks pages would have the same photo.
Another Dept would have another default photo.

Ideally I would like to be able to change the photo periodically.

Right now we have this in our skin:

background: url(/Portals/0/MySkin/imgs/background-sample.jpg) no-repeat;

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
26 Sep 2008 01:27 PM  
dax
New Member
New Member
Send Private Message
Posts:6

--
26 Sep 2008 01:59 PM  
I sometimes use the Page Icon option in page settings to do this. It is in the Advanced Settings area. You can then put this code in your SKIN (not css file) to get it to work. Just put this in css for the body tag (or where ever you want it).

background: url(<%=PortalSettings.ActiveTab.IconFile%>) no-repeat;

I did this in my skin where I wanted a header graphic to be the same for all pages in a section of the site. In otherwords, all pages below the About Us main tab had the same header graphic. You could change it to be a background graphic if this is what you are going for.

< img class="imgPageHeader" src="http://www.snapsis.com/Portals/0/images/pageheaders/hdr<%= PortalSettings.ActiveTab.BreadCrumbs(0).TabId %>.jpg" alt="Header Image" / >

(remove the spaces in the start and end of the code) You then need to put an image named hdrTabID.jpg in the /Portals/o/images/pageheaders/ folder. This requires you to see what the page ID is of each top level navigation page. Easiest way to do that is to surf to the page, click page settings and look at the URL and see the tabid in the URL.

Hope this helps...

Dax
noman
New Member
New Member
Send Private Message
Posts:2

--
28 Sep 2008 01:59 PM  
John,

This is a superb thread, very very helpful.

I need to display skin name (w/o the .ascx extension) in my skin, and in another case I have to display the last two letters of the skin filename.

Now I know that I can use
<%=PortalSettings.ActiveTab.SkinSrc%>
to display the skin Source, which includes the complete path and the extension for the file.

eg: portals/PotrtalID/skins/dotnetnukeskinname/myskin05.ascx

But I only want:
"myskin05" and "05"

How can I accomplish this, I already have a [script removed]
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 4 of 5 << < 12345 > >>


Active Forums 4.1
Visit our Store for great DotNetNuke Modules and Skins
DotNetNuke CSS Menu 3.4.6 (single use)

Item codeCSSNM33SU
AuthorJohn Mitchell
Base Price$39.00
Product Information 
DotNetNuke CSS NavMenu 3.4.6 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
DotNetNuke Performance Caching & Compression - PageBlaster 3.4.5 - Professional Edition

AuthorJohn Mitchell
Base Price$59.00
Product Information