Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nigel 29 posts 52 karma points
    Jan 27, 2015 @ 12:41
    Nigel
    0

    Image path not relative

    Installed user plugin - however the image path is not relative so you get a missing image on any sub content pages 

    <span clas="label"> <a href='http://www.facebook.com' title='Facebook' target='_blank'><imgsrc='usercontrols\themes\sawb\facebook.png' style='border:none;' class='social-icon' data-name='Facebook'data-image='facebook.png' /></a> </span>
  • Carlos Casalicchio 176 posts 735 karma points
    Jan 27, 2015 @ 15:45
    Carlos Casalicchio
    0

    In the CHTML, change it to this and let me know if it works

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using umbraco.NodeFactory;
    @using umbraco.MacroEngines;
    @using System.Configuration;
    @{
        DynamicNode node = Library.NodeById(Model.Id);
        string ThemesFolder = ConfigurationManager.AppSettings["SocialMediaThemeFolder"] == null ? "~/usercontrols/themes/" : ConfigurationManager.AppSettings["SocialMediaThemeFolder"].ToString();
        Social_Media_Channels.Engine.Manager manager = new Social_Media_Channels.Engine.Manager(ThemesFolder, false, true);
        Social_Media_Channels.Engine.Manager tmp;
        string propertyName = "contactSocialMediaChannels"; //set the property name in case it was changed
    
        try
        {
            tmp = Social_Media_Channels.Engine.Utilities.JsonHelper.JsonDeserialize<Social_Media_Channels.Engine.Manager>(node.GetPropertyValue(propertyName));
            manager.ShowLabels = tmp.ShowLabels;
            manager.LoadSelectedTheme(tmp.CurrentThemeID);
            manager.LoadSavedUrls(manager.CurrentTheme, tmp.CurrentTheme);
    
        }
        catch { tmp = new Social_Media_Channels.Engine.Manager(ThemesFolder, false, true); }
    }
    <ul class="social-channels" id="social-channels">
        @if (tmp.CurrentTheme != null)
        {
            foreach (Social_Media_Channels.Entities.Channel channel in manager.CurrentTheme.Channels)
            {
                if (channel.Url != "")
                {
                    <li class="social-channel">
                        @Html.Raw(Social_Media_Channels.Engine.Manager.RenderRawA(manager.CurrentTheme, channel))
                        @if (manager.ShowLabels)
                        {
                            <span class="label"><a href="@channel.Url" target="_blank">@channel.Name</a></span>
                        }
                    </li>
                }
            }
        }
        else
        {
            <li class="social-channel">@Dictionary["[Corporate][Page Data]No Channels"]</li>
        }
    </ul>
    
  • Nigel 29 posts 52 karma points
    Jan 27, 2015 @ 16:52
    Nigel
    0

    Nope. Sorry

  • Carlos Casalicchio 176 posts 735 karma points
    Jan 27, 2015 @ 17:26
    Carlos Casalicchio
    0

    Sorry Nigel, I have had an issue with it as well but never got around to fixing it... i'll look at it and will let you know

  • Nigel 29 posts 52 karma points
    Jan 30, 2015 @ 10:23
    Nigel
    0

    All we need is a forward slash at the start!

  • Nigel 29 posts 52 karma points
    Jan 30, 2015 @ 10:32
    Nigel
    0

    All we need is a forward slash at the start!

     src"/usercontrols....
    

    Sorry if I'm stating the obvious as I'm sure you know that. But sometimes...you never know

    PS - Reposted as previous message is breaking the forum!

  • Carlos Casalicchio 176 posts 735 karma points
    Jan 30, 2015 @ 15:32
    Carlos Casalicchio
    0

    Nigel, did you get it resolved then? Like i've said it's been a while. I don't even remember where the problem was so if that's all it needs to fix it then the credit is all yours!

    I'll make sure to add it soon (i also need to upgrade the package to umbraco 7 anyway)

Please Sign in or register to post replies

Write your reply to:

Draft