Sign In  |  Register
 
 
DotNetNuke Support Forums
DotNetNuke Tokens: Some tricks for getting more than SkinPath in your skin.
Last Post 03 Jun 2009 09:01 AM by mgroves. 88 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 5 of 5 << < 12345
AuthorMessages
noman
New Member
New Member
Send Private Message
Posts:2

--
28 Sep 2008 02:01 PM  
How can I accomplish this, I already have a runat server script tag in the skin, so any code that needs to run at server should not be a problem.

Keep up the good work, and thank you in advance,
Hammond.
pspeth
New Member
New Member
Send Private Message
Posts:9

--
07 Oct 2008 07:21 AM  
Posted By dax on 09/26/2008 1: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


Dax,

Thanks for the tips.  In the end I added a Javascript snippet to do this that worked along the same lines as what you have here.

<_script_type="text/javascript">
 var myBG = "url(/Portals/6/blohm/imgs/hdr" + <%=PortalSettings.ActiveTab.BreadCrumbs(0).TabId%>+ ".jpg)";
document.body.style.backgroundImage = myBG;
<_/script>

I may change it to use the page icons method, and need to add logic to load a default if the calculated filename doesn't exist.

K-FleX
New Member
New Member
Send Private Message
Posts:1

--
05 Dec 2008 01:49 AM  

Thanks John,  this thread saved me loads of work especially this code:

<ahref="<%=NavigateUrl(36)%>">Homea>
I have another query - it probably isn't possible.

Is there a way to invoke a module directly through the skin?  Basically I have a menu system that is built off an ajax accordian module so the entire page expands when you click the menu bar.
This isn't that big a problem but I have multiple menus depending on where you are on the site (different skins) and it would save me heaps of time if I could invoke it directly from the skin.

 

Thanks,

 

Pete

pspeth
New Member
New Member
Send Private Message
Posts:9

--
12 Dec 2008 09:25 AM  

I am using the following code to update my background images but unfortunately the code crashes if I am on one of the top level pages.
I have tried to add if statements to prevent this but to no avail.&#160; Could you point out the error?

Thanks

<_script type="text/javascript">
  var myBG = "url(/Portals/0/COEL/imgs/hdr.jpg)";
  if (<%=PortalSettings.ActiveTab.Level%>&gt; 1) {
   if (<%=PortalSettings.ActiveTab.BreadCrumbs(1).TabName%>="Departments") {
    var myBG = "url(/Portals/0/COEL/imgs/hdr" + <%=PortalSettings.ActiveTab.BreadCrumbs(2).TabId%> + ".jpg)";}}
    document.body.style.backgroundImage = myBG;
<_/script>
adriandominicans
New Member
New Member
Send Private Message
Posts:1

--
13 Feb 2009 07:47 AM  

Posted By K-FleX on 05 Dec 2008 01:49 AM

Thanks John,  this thread saved me loads of work especially this code:



<ahref="<%=NavigateUrl(36)%>">Homea>




A better solution to link to the home tab is this: <%=NavigateUrl(PortalSettings.HomeTabId)%>, which is "home tab agnostic" - you can use to link to the home on any portal, even if the home tabid is 70009.

macr0hard
New Member
New Member
Send Private Message
Posts:2

--
09 May 2009 04:51 AM  
Hi,

I'm a DNN newbie and dont know .net so please help me out

How do I display the breadcrumbs so that it shows all levels from parent to child, with parent having hyperlink. I'm using DNN3 and there seems to be a breadcrumb in the skin that i bought already but it doesnt show the parent.

thank you very much in advance
John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4138
Avatar

--
09 May 2009 06:55 AM  
Set the RootLevel property to zero:

dnn:Breadcrumb runat="server" id="dnnBreadcrumb" RootLevel="0"
macr0hard
New Member
New Member
Send Private Message
Posts:2

--
09 May 2009 07:36 AM  
thank you so much John. That worked! Just 1 more question, how do I remove the link on the child (current active) page?

Also, do you know if there's a free site map module that I can download?
mgroves
New Member
New Member
Send Private Message
Posts:1

--
03 Jun 2009 09:01 AM  
Hi John,

I've been using <%=PortalSettings.ActiveTab.Title%> and other for sometime now, and checking this thread regularly for any developments. Thanks for all the tips thus far ! :) I'm hoping you may be able to help with my latest need.

I've started to use a module that re-writes the tags in the page which updates the browser title bar. Unfortunately, my skin continues to show the title I've defined in page settings, not the updated version. (I suspect this is due to DNN writing the HTML (including my Page Settings, Page Title) and the title tags being changed as this text stream is sent to the browser, thereby missing the title token in the skin?) Anyway, regardless of what's happening, my question is can you suggest a way in which I can display the updated title in my skin, rather than that defined in page settigns?

Hope you can help :)
Cheers
Matt
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Page 5 of 5 << < 12345


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

Item codeCSSNM33SU
AuthorJohn Mitchell
Base Price$39.00
Product Information 
DotNetNuke CSS NavMenu 3.4.1 (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