Copied to clipboard

Flag this post as spam?

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


  • Brent 29 posts 240 karma points
    Aug 30, 2017 @ 15:48
    Brent
    0

    I want to edit HTML; where is the file that has the contentplaceholder ID's?

    Hi everyone,

    I'm new to editing Umbraco files. My knowledge is in CSS and HTML.

    I'm trying to edit HTML. The problem is, the place where it's supposed to be has this on the backoffice viewing section of the template:

    <asp:Content ContentPlaceHolder id="contentArea" runat="server" />  
    

    I would like to find where the heck the ID "contentarea" is so I can edit the HTML, but I don't even know what file to pull. I tried the default.umbraco file. But I don't see this verbiage anywhere.

    Where is it by default in a fresh installation of Umbraco 7?

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 30, 2017 @ 17:08
    Alex Skrypnyk
    0

    Hi Brent

    <asp:Content ContentPlaceHolder id="contentArea" runat="server" />  
    

    This is asp.net web forms code, you can't use this id as id in html.

    Go to masterpages folder and find template what you need on the page.

    What version of Umbraco are you using?

    Thanks,

    Alex

  • Brent 29 posts 240 karma points
    Aug 31, 2017 @ 20:26
    Brent
    0

    I eventually figured out, that the part I want to edit is found as an actual XSLT file. Something I also have never worked with before...

    I have researched this though, and the code looks correct, but some how the it's not retrieving the images from the media section. Can anyone shed light on this?

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [        <!ENTITY nbsp "&#x00A0;">]>
    
    <xsl:stylesheet        
      version="1.0"        
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"        
      xmlns:msxml="urn:schemas-microsoft-com:xslt"        
      xmlns:umbraco.library="urn:umbraco.library"        
      xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon"     
      xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes"        
      xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath"        
      xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions"        
      xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings"        
      xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"        
      xmlns:ferinet="urn:ferinet"        
      xmlns:random="urn:random"        
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ferinet">
    
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>
    
    <xsl:template match="/">   
    
    <xsl:variable name="images" select="$currentPage/imageFolder"/>
    <xsl:variable name="imgWidth" select="704"/>
    <xsl:variable name="imgHeight" select="297"/>
    
    <xsl:if test="$images">
      <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($images, 'true')" />
      <xsl:variable name="numImages" select="count($mediaNode/RotatorImage [string(umbracoNaviHide) != '1'])"/>
    
      <xsl:choose>
    
        <xsl:when test="$numImages = 0">
        </xsl:when>
        <xsl:when test="$numImages = 1">
          <xsl:for-each select="umbraco.library:GetMedia($images, 'true')/RotatorImage [string(umbracoNaviHide) != '1']">
    
            <xsl:variable name="url">
              <xsl:choose>
                <xsl:when test="./externalLink != ''" >
                  <xsl:value-of select="./externalLink"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:value-of select="umbraco.library:NiceUrl(./link)"/>
                </xsl:otherwise>
              </xsl:choose>
            </xsl:variable>
    
            <xsl:variable name="image" select="./umbracoFile"/>
            <a href="{$url}">        
              <img src="/ImageGen.ashx?image={$image}&amp;width={$imgWidth}&amp;height={$imgHeight}" height="{$imgHeight}" width="{$imgWidth}" border="0"/>
            </a>
          </xsl:for-each>   
        </xsl:when>
    
        <xsl:otherwise>
    
          <!-- SHOW SLIDES -->
          <div id="container">
           <div id="slideshow">
              <ul id="slides">
              <xsl:for-each select="umbraco.library:GetMedia($images, 'true')/RotatorImage [string(umbracoNaviHide) != '1']">
    
              <xsl:variable name="url">
                <xsl:choose>
                  <xsl:when test="./externalLink != ''" >
                    <xsl:value-of select="./externalLink"/>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:value-of select="umbraco.library:NiceUrl(./link)"/>
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:variable>
    
                <xsl:variable name="image" select="./umbracoFile"/>
                <li><a href="{$url}"> 
              <img border="0" style="" width="704" height="297">
              <xsl:attribute name="src">
            <xsl:text>/ImageGen.ashx?image=</xsl:text>
                   <xsl:value-of select="$image"/>
            <xsl:text>&amp;height=297</xsl:text>
            <xsl:text>&amp;width=704</xsl:text>
              </xsl:attribute>
              </img>
            </a></li>
              </xsl:for-each>   
              </ul>  
       <ul id="nav">
               <li id="prev"><a href="#">&nbsp;</a></li>
               <li id="next"><a href="#">&nbsp;</a></li>
              </ul>      
            </div>      
          </div>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:if>
    
    
        </xsl:template>
    </xsl:stylesheet>
    
  • Brent 29 posts 240 karma points
    Aug 30, 2017 @ 17:35
    Brent
    0

    I'm using Umbraco 7.

    I've looked at the master pages folder and found the template. But the HTML source code that you see when navigating the website, is different from when you view the masterpage template.

    That page has HTML in it, but this one little section has this code in there and I don't know where to go to edit it.

    Thanks in advance.

  • Brent 29 posts 240 karma points
    Aug 30, 2017 @ 17:46
    Brent
    100

    This is part of the HTML that it shows when you view source on IE that is replaced by that other code mentioned beforehand:

    <script type="text/javascript">
      $(document).ready(function() {    
               /**/$("#slideshow").css("overflow", "hidden");
      $("#slideshow").css("padding", "1px");
      $("#slideshow").css("height", "300px");
    
    
    
                $("ul#slides").cycle({
                  fx: 'fade',
                  pause: 1,
                  timeout: 5000,
                  fastOnEvent: 500,
                  prev: '#prev',
                  next: '#next'
                });
                $("#slideshow").hover(function() {
                  $("ul#nav").fadeIn();
                  },
                    function() {
                  $("ul#nav").fadeOut();
                });
              });
    </script>
    
    <div class="allBodyConentHomepage">
      <div style="">
    
      </div>
       <div id="rotatorShadow">
          <img src="images/rotator_shadow.jpg" width="703" height="24" style="" />
      </div>
      <center>
      <table class="addBar" cellpadding="0" cellspacing="0" width="709">
          <tr>
              <td valign="top" class="addBarL">
    
              </td>
              <td valign="top" class="addBarM">
                  <div class="addContent">
                  <table cellpadding="0" cellspacing="0" width="100%">
                      <tr>
    
Please Sign in or register to post replies

Write your reply to:

Draft