0

I am facing an issue while access getfeildvalue method for related components in my DWT.

I am getting issue like type Mismatch.

Code of my DWT is below:

<div>
        <div class="c80l">
            <div class="subcl">
<div id="divArticle" class="ArticleContainer">
<div class="ArticleHeader">
        <h2>@@RenderComponentField("Fields.Title",0)@@</h2>
        <!-- TemplateBeginIf cond="Component.Fields.Author!=''" -->
             <em>@@GetResourceComponentFieldValueByWebDavURL('Building%20Blocks/Content/Common/ResourceList.xml','Resource','Article_By')@@
             <!-- TemplateBeginRepeat name="Component.Fields.Author" -->
                   <!-- TemplateBeginIf cond="TemplateRepeatIndex!=0" -->,
                       <!-- TemplateEndIf -->
                   <span class="AuthorName">                        
                        <a tridion:href="@@Field@@">@@GetFieldValue(Field, "Name")@@</a>
                   </span>
             <!-- TemplateEndRepeat -->
                                     <!-- TemplateBeginIf cond="Component.Fields.DateAuthored!=''" -->
                  <span class="divider"> | </span>
             <!-- TemplateEndIf -->
        <!-- TemplateEndIf -->

                                 <!-- TemplateBeginIf cond="Component.Fields.DateAuthored!=''" -->
 <span class="PublishDate"><span>@@GetResourceComponentFieldValueByWebDavURL('Building%20Blocks/Content/Common/ResourceList.xml','Resource','Article_PublishedOn')@@</span>  
@@GetFormattedDate(Component.Fields.DateAuthored, "M/d/yyyy h:m:s tt" , "MMMM dd yyyy", GetResourceComponentFieldValueByWebDavURL('Building%20Blocks/Content/Common/ResourceList.xml','Resource','CurrentCulture'))@@</span>
                               <!-- TemplateEndIf -->

             </em><br />

        <!-- TemplateBeginIf cond="Component.Fields.SubTitle!=''" -->
             <strong id="Strong1">@@RenderComponentField("Fields.SubTitle",0)@@</strong>
                                 <!-- TemplateEndIf -->
    </div>

    <!-- TemplateBeginIf cond="!Page" -->
    <!-- TemplateBeginRepeat name="Component.Paragraphs" -->    
         <div class="subcolumns">
              <!-- TemplateBeginIf cond="Component.Paragraphs.Picture!=''" -->
                   <div class="ImageControl floatLeft">
                        <p class="icaption_left"><img tridion:href="@@Field.Picture@@" src="@@Field.Picture@@" alt="" class="fiximage" tridion:type="Multimedia" /><strong id="Strong2"></strong></p>
                       </div>
              <!-- TemplateEndIf -->

              <!-- TemplateBeginIf cond="Component.Paragraphs.Headline!=''" -->     
        <h3>@@RenderComponentField("Fields.Paragraphs.Headline",0)@@</h3>
              <!-- TemplateEndIf -->

              <!-- TemplateBeginIf cond="Fields.Paragraphs.Text!=''" -->
        @@RenderComponentField("Fields.Paragraphs.Text",0)@@
              <!-- TemplateEndIf -->
         </div>
    <!-- TemplateEndRepeat -->
    <!-- TemplateEndIf -->  
            </div>
        </div>
</div>

<div class="c20r">
            <div class="subcr">
                 <!-- TemplateBeginIf cond="Component.Fields.RelatedArticles!=''" -->
                      <div class="RelatedArticlesComponent">
                      <div class="ContHead"><h3>Related Articles</h3></div>
                 <!-- TemplateEndIf -->

                 <div class="TopRecipe">
                      <ol>
                           <!-- TemplateBeginIf cond="!Page" -->
                           <!-- TemplateBeginRepeat name="Component.Fields.RelatedArticles" -->
                                <li>
                                     <a tridion:href="@@Field@@" title=@@GetFieldValue(Field, "Title")@@>@@GetFieldValue(Field, "Title")@@</a>
                                </li>
                           <!-- TemplateEndRepeat -->
                      </ol>
                 </div>
            </div>
                           <!-- TemplateEndIf -->
            </div>
            </div>
</div>
<input type="hidden" runat="server" value="@@Component.ID@@" id="ComponentID" />
<input type="hidden" runat="server" value="Article" id="ComponentType" />
1
  • Hi Manish, welcome to the community. I've tried to tidy your question up a little bit in terms of formatting but could you please add a bit more detail on the issue and the error that is occurring, and what you tried to resolve it? It will be difficult to answer this with the current level of detail. Please help people to help you Dec 24 '14 at 11:07
2

Seems @@GetFieldValue(Field, "Name")@@ is not getting resolved in DWT while preview or publishing, if this is the issue then you have to be sured that your DWT methods dll get registered properly into GAC.

Please try to enter a config entry for dll into the contentmanager.config file and also restart the tridion servcie host, tridion site in IIS, com+ service.

or might be your method is not fully working so please verify your method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.