2016-08-10 9 views
0

最初にこのページの全ユーザーにお伝えしたいと思います。ウェブ開発における助けを求めていますが、質問をする時です。silverstripeテンプレートのスタイルリスト - 「ViewableData :: getField()の引数が1つもありません」

私はお互いに似ているためにsilverstripeテンプレート上の2つのリストを変更する必要が - ここでは、「ソース」である1です:

<% if not $IsThanks %> 
       <% if $IsSequentialSearch %> 
        <section class="panel vacancy columns jobalertform" style="background: #fff;"> 
         <h1 class="searchfilter"><%t Site.JobAlert 'Job Alert' %></h1> 
         <% include JobAlertForm %> 
        </section> 
       <% else_if $IsSearch %> 
        <section id="JobAlertFormModal" class="reveal-modal medium row" style="background: #fff;top:200px!important" data-reveal aria-hidden="true" role="dialog"> 
         <h1 class="searchfilter"><%t Site.JobAlert 'Job Alert' %></h1> 
         <% include JobAlertForm %> 
         <a class="close-reveal-modal" aria-label="Close">&#215;</a> 
        </section> 
       <% end_if %> 
      <% end_if %> 

、ここでは、私は同じように見えるために変更する必要があります一つです前回のいずれかに:

<ul> 
        <% loop $Jobs %> 
         <% if $IsInternal %> 
          <section class="panel vacancy columns jobalertform" style="background: #fff;"> 
           <a href="$SireJobPage.Link('viewvacancy')/$Link/?m=$ConsultantID" target="_blank" title="$Title"><h1 class="searchfilter"> 
            <% include JobAlertForm %> 

           </h1></a> 
          </section> 
         <% else %> 
          <section class="panel vacancy columns jobalertform" style="background: #fff;"> 
           <a href="$JobAdPage.Link('viewvacancy')/$Link/?m=$ConsultantID" target="_blank" title="$Title"><h1 class="searchfilter"> 
            <% include JobAlertForm %> 

           </h1></a> 
          </section> 
         <% end_if %> 
        <% end_loop %> 
       </ul> 

一つ目はジョブの検索結果を担当し、2つ目は、特定のリクルーターに関連したジョブのリストです。貼り付け中に<% include JobAlertForm %>エラーが発生しました[Warning] Missing argument 1 for ViewableData::getField(), called in /var/www/sites/sire-search.com/htdocs/framework/view/ViewableData.php on line 108 and defined私のミスはどこですか?

JobAlertForm.ss

<% with $JobAlertForm %> 
    <% if $IncludeFormTag %> 
     <form $AttributesHTML data-abide> 
    <% end_if %> 
    <% if $Message %> 
      <div id="{$FormName}_error" class="alert-box<% if $MessageType == "bad" %> alert<% end_if %>">$Message<a href="" class="close">&times;</a></div> 
    <% else %> 
      <div id="{$FormName}_error" class="alert-box secondary" style="display: none;"></div> 
    <% end_if %> 

     <div class="row"> 
      <div class="columns small-12 medium-8"> 
       <% loop $Fields %> 
        $FieldHolder 
       <% end_loop %> 
      </div> 
      <div class="columns small-12 medium-4"> 
       <% loop $Actions %> 
        $Field 
       <% end_loop %> 
       <p> 
        <%t Site.IfContinueAgreeWithOur 'If you continue, you are agreeing with our' %> 
        <a id="TOSLink" href="$Top.PrivacyPolicyPage.Link" target="_blank"><%t Site.TermsAndConditions 'Terms & Conditions' %></a> 
        .</p> 
      </div> 
     </div> 

    <% if $IncludeFormTag %> 
     </form> 
    <% end_if %> 
<% end_with %> 
+0

あなたは含まれての内容を貼り付けることができます/ JobAlertForm.ss?問題はそのファイルのどこかにある可能性があります – kinglozzer

+0

@kinglozzer私はそれを最初の投稿に貼り付けました:) – Emill

答えて

0

okが、私はこれを解決し、コードは(他の目的のためにいくつかの追加修正を)次のようになります。

<section class="panel vacancy columns" data-link="{$Up.JobAdPage.Link('viewvacancy')}/$Link{$Up.SearchFiltersAsQueryString}&pos={$Pos}" data-target="_blank"> 
    <h2><a href="$SireJobPage.Link('viewvacancy')/$Link/?m=$ConsultantID" target="_blank" title="$Title">$Title</a></h2> 
    <p class="img"> 
    <a class="button radius tiny right" href="{$Up.JobAdPage.Link('viewvacancy')}/$Link{$Up.SearchFiltersAsQueryString}&pos={$Pos}" target="_blank" title="<%t Site.ApplyNow 'Apply Now' %>"> 
      <%t Site.ApplyNow 'Apply Now' %> 
     </a> 
     <img class="profile" alt="$Consultant.Title" title="$Consultant.Title" src="$Consultant.ProfilePicture.URL" /> 
    </p> 
    <dl> 
     <dt><%t Site.Location 'Location' %></dt><dd><% if $JobAdRegion.Title %>$JobAdRegion.Title/<% end_if %>$JobAdCountry.Title</dd> 
     <dt><%t Site.Specialisation 'Specialisation' %></dt><dd>$JobAdSpecialisation.Title</dd> 
     <dt><%t Site.Sector 'Sector' %></dt><dd>$JobAdSector.Title</dd> 
    </dl> 
    <p> 
      $Summary 
    </p> 
</section> 
関連する問題