You need to Register for free and Login to post a message in the forum.

Forum

sample of page specific images
Last Post 2010-02-11 03:52 PM by Joseph Craig. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ALHUser is Offline
Nuke Newbie
Nuke Newbie
Posts:2

--
2010-02-11 01:35 AM
    Hi there

    I looking for a solution that would allow me to put page specific images, under the logo or instead of the logo image on my DNN site.  I found a post which offers a possible solution but to be honest don't have enough experience to fully understand everything that is being suggested.  Can you or anyone else add details or better yet provide an example of how to implement this solution?

    It would be very much appreciated.

    Here is the link to the original post

    http://www.dotnetnuke.com/Community...oding.aspx

    And here is the text in that post.


    Here is a shortcut to show page specific images, like page headers, on every page by adding a tiny bit of code to your skin:

       <h3 class="current-place-head">
       <%
        If (Not PortalSettings.ActiveTab Is Nothing) Then
            Response.Write("<img class="png" src="" & SkinPath & "images/images/" & _
                PortalSettings.ActiveTab.TabName.Replace(" ", "-") & ".png" alt="" & _
                PortalSettings.ActiveTab.Title & "" />")
        End If
       %>
    </h3>

    Here is what I did:

    1. Named my images exactly the same as the Page Name on which they will reside

    2. Replaced spaces used in Page Names with dashes (-) in the images names

    3. In a skin file, I simply put the above code in the place where the page header should appear (in this case it's inside an h3 tag)


    Thanks in advance

     M.

    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2010-02-11 02:31 AM
    The example you cited is a really good one. The basic idea is that it will generate an image tag with the src set to the URL of an appropriately named image.

    Here is another way to do this using token replacement in the Text/HTML module.

    If you enable token replacement for the module, you can put something like this in the Text/HTML module:

    http://[Portal:URL][Portal:HomeDirectory]myDirectory/[Tab:TabName].jpg

    Now, if you have a directory in the root of your portal (i.e. /Portals/N/myDirectory) and you have images in that directory named Home.jpg, Page1.jpg, etc., the page image will be displayed if you wrap the above string in an image tag.

    I would set your skin so that there is a "content pane" where you want the images to appear, place a Text/HTML module in that pane, and set the module to appear on all pages. You will need to the string in the "source" mode of the editor.

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    ALHUser is Offline
    Nuke Newbie
    Nuke Newbie
    Posts:2

    --
    2010-02-11 03:39 PM
    Hello Joe

    Thanks for your response. I am going to try to implement your solution this morning.  Could you take a moment and expand on the last sentence in your post which reads

    "You will need to the string in the "source" mode of the editor."

    I don't understand the message that you are trying to convey to me.

    Thanks

    M.
    Joseph CraigUser is Offline
    DNN Creative Support
    Nuke Master VI
    Nuke Master VI
    Posts:9008
    Avatar

    --
    2010-02-11 03:52 PM
    When you use the editor to insert into a text/HTML module, you can enter it as WYSIWYG text, or you can turn off the rich text editor and enter html.  Since you are inserting an image tag, you will need to do this in HTML mode.

    You can get into HTML mode by clicking the SOURCE button in the editor, or by changing the radio button selection to just turn off the rich text editor.

    Joe Craig, DNN Creative Support

    Subscribe to DNNCreative
    I recommend PowerDNN for DotNetNuke Hosting.
    You are not authorized to post a reply.


    Active Forums 4.3

    Latest Forum Posts

    RE: "Good" hosting providers by ejcullen rene
    informative!!!
    RE: URL Master Module doesn't work on IHostASP hosting by ejcullen rene
    informative!!!
    RE: shared web hosting by ejcullen rene
    informative!!. i got hosting service from http://www.thewebpole.com/ my hosting company offers you
    RE: iPhone website logo in DNN root directory by JohnnieD
    I'm supposed to add this link to make my custom logo show up on iPhones. Where in DNN would I a
    iPhone website logo in DNN root directory by JohnnieD
    I'm trying to put an iPhone logo that I made into my site so when someone saves the website on their
    RE: Fixed size container by Joseph Craig
    Use an HTML module and style the container to have a fixed height and width. Set the overflow attr
    Fixed size container by Aggiedan97
    I am looking for advice or an actual container that has a fixed height (and width). An HTML module w
    RE: DNN 6.1 app_offline.htm by Joseph Craig
    If the site "works" in Chrome, Firefox and Safari, but not in IE8 look to IE8 as the problem. It is
    RE: DNN site automatically redirects to a different domain name. by Joseph Craig
    Make a copy what is in the portalalias table and then remove all but the localhost entry. Verify th
    DNN 6.1 app_offline.htm by Dave Hassall
    Hi As recommended I have successfully been using the app_offline.htm whilst performing upgrades t
    RE: DNN site automatically redirects to a different domain name. by imran shaikh
    Hi i have done same as mention in this post my dnn folder name is Trademaxomanupg with
    Enforce Terms Tutorial Update by Vistalogix Corporation
    I tried configuring my DNN 6.1.2 install to have a required "accept terms" checkbox as described in
    RE: Best Practices for Modifying a Custom Module by Joseph Craig
    Start up the development website, then install the module using the package that you have. Then, yo
    Best Practices for Modifying a Custom Module by schilders
    Good Morning, I'm needing to modify a custom built module created by another developer targeted f
    RE: Admin menu problem by alireza arabiyan
    hi in localhost i have http://localhost/senf/خانه.aspx and http://localhost/senf/Admi
    RE: Admin menu problem by Joseph Craig
    Yes, that is what you should have done. What is the URL for your home page? What is the URL for
    RE: Admin menu problem by alireza arabiyan
    hi first in localhost i add my domain.com as portal alias. then copy all files to host , restore my
    RE: Admin menu problem by Joseph Craig
    How did you move it? Have you added an entry in the portalalias table for the site's domain name?
    RE: Re: SQL SERVER 2008 R2 Remote connection by Joseph Craig
    Set up a user with dbo privileges and set the connection string for that user, rather than using Win
    Re: SQL SERVER 2008 R2 Remote connection by Prakasam Srinivasan
    I have successfully configured MSSQL Server 2008 r2 remote connection. I am using windows 7 and it h
    You are not logged in.
    You must log in to access all 
    650+ videos, tutorials, podcasts, and more.
    RSS Feeds