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...Administration ...Administration ...I need coding helpI need coding help
Previous
 
Next
New Post
2/5/2013 10:53 AM
 

I am contracting with a company to finalize a website that an ad agency built. I am getting it ready for launch and the company wants a lot of changes to it. However, I am not a back end coder, and this request has me stumped.

On the site there is a "Modular Solutions" panel in the right rail that was originally set to be hidden on any page on which the breadcrumbs contain the phrase "Modular Solutions," using an "If" command that someone else wrote (see code below or attached file). But what I need is for this panel to show on every page of the site except for 5 specific pages (each of which have "Modular Solutions" in the breadcrumbs). I just don't know how to rewrite the code to hide the panel on just those 5 pages. Can you help, or tell me where to find help, to do this? The below code is the code that (I'm assuming) needs to change. The code is contained in a file called RightColumn.ascx. I would upload the file and a screenshot of the page, but I don't see anywhere to add attachments.

<% If PortalSettings.Current.ActiveTab.BreadCrumbs(0).TabName <> "Modular Solutions" Then%>
<div class="panel-container">
<div class="text-container">
    <h2><strong>Modular</strong> solutions</h2>
    <p>
       Focus on today's challenge now and build a path to address tomorrow's with rapidly implemented modular solutions that minimize risk while maximizing agility and efficiency.
    </p>
</div>
<a href="/ModularSolutions.aspx" title="Learn more" class="button blue">Learn more</a>
</div>
<div class="divider"></div>
<% End If%>

 
New Post
2/5/2013 11:09 AM
 
There are a number of different ways to do this in DotNetNuke, but putting something inline in the skin like that probably isn't the best solution.

That being said, since you are likely short on time to learn the proper way, you can probably just do a large if statement where you currently have the IF statement, change it to

<% If PortalSettings.Current.ActiveTab.TabName <> "Modular Solutions" or PortalSettings.Current.ActiveTab.TabName <> "something else" or PortalSettings.Current.ActiveTab.TabName <> "something else 2" Then%>

You could try that out, I haven't tested it myself

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
2/5/2013 11:27 AM
 

Thanks for the quick reply! Will that work even though the pages I don't want the content to show on have "Modular Solutions" in the breadcrumbs? I guess I could try it and see :)

What is the opposite of "<>" which I'm assuming means "doesn't contain"? Is it "="? And is there a way I could use some page element other than the breadcrumbs to indicate what should happen?

What are the steps involved for me to learn the 'long way' to do this?

 
New Post
2/11/2013 1:29 PM
 
If anyone could answer the questions I asked in my last post above, I would be very grateful!! I am totally at a loss.

That "If/Then" string by Chris Hammond didn't work for our site, because it references breadcrumb words that are used on pages that should AND shouldn't show that content.
 
New Post
2/13/2013 7:52 AM
 
This will return the full URL, like http://intranet/page1.aspx

Dim strFullPageURL = DotNetNuke.Common.Globals.NavigateURL.ToString()

Change your If statement to something like this:

<%
if strFullPageURL = "http://intranet/page1.aspx" or strFullPageURL = "http://intranet/page2.aspx" then
%>
your code here
<%
end if
%>

Like Chris stated, this isn't the best way to accomplish this. If it were me I'd create a second skin for these 5 pages and it would include that code but this may work for you.

Mark
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...I need coding helpI need coding help


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