1.11M Members

One content twice on a page

 
0
 

Dear Members/Guests,

First of all, I'd like to tell you, the following website I am going to talk about is not created by me, so that's why I am having some problems editing or developing it.

The problem is, that I have duplicate content on my website's subpage, have a look at here: http://www.facetivals.com/Dialogues <--- here as you can see, once we have the same information in the table when you click on an event name or venue name, and the same information after it, but not in a table form. Since I have this information in my html file once, I can only delete both data.

Okay, it is a bit complex, isn't it? I am going to give you my ".tpl" extension include (used Smarty I think). Try to find the way in it to delete the event information once. I type the important part in Bold!

<!-- {fest.fTitleL} -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div id="festivalForm">


    <input type="hidden" name="fID" value="{fest.fID}" />

    <input type="hidden" name="abc" value="{fest.abc_filter}" />

    <h1><span></span>{fest.fTitleL}</h1><a href="https://twitter.com/share" class="twitter-share-button" data-via="facetivals" data-lang="hu">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> <div class="fb-like" data-send="false" data-width="450" data-show-faces="false"></div>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium"></g:plusone>


<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>


  <div class="r">

        <a class="reportlink" href="?subject={reportSubject}" lang="com" id="_578_changes" name="facetivals" title="Please report to us in an e-mail the errors/changes you found on this page.">Report errors/changes</a>



        <div id="festivalIconset">

            <!-- toCountry --><div id="toCountry" title="Show this festival on map" class="toCountry sprite"></div><!-- toCountry -->

            <div id="addJourney" title="Add the complete festival to MyPlanner" class="addJourney sprite"></div>

            <!--<div id="addCalendar" class="addCalendar sprite" title="Import festival into iCalendar"></div>-->

        </div>

    </div>

<script type="text/javascript"><!--
google_ad_client = "basdfasdf";
/* szalag */
google_ad_slot = "7691470606";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


    <div class="l">

        <p class="mainDate">{fest.startDate} - {fest.endDate}</p>

        <p align="justify" class="mainDate"><em>{places}</em></p>

        <p><i>Information last updated: {update}.</i></p>

        <p></p>

    </div>

    <div class="clear"></div>

    <p class="noSearch">{fest.desc_en}</p>



    <!-- summary_list -->

    <**div class="hr"></div>

    <h2 class="list"><span></span>Event list</h2>

    <p class="noSearch"><i>In the list, click on the Event Name or Venue to get more information.</i></p>

<script type="text/javascript"><!--
google_ad_client = "cbafaadf";
/* asdsd */
google_ad_slot = "9059451293";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

    <table id="eventList">

    <tr><th></th><th>Date</th><th>Time</th><th>Event name</th><th>Category</th><th>City</th><th>Venue</th><th></th><th></th></tr>

    <!-- <list> -->

    <tr><td class="ar"><div></div></td><td nowrap="nowrap"><p>{ev.date}</p></td><td nowrap="nowrap"><p>{ev.startTime} </p></td><td class="event" title="Open details"><span id="e_{ev.eID}_{ev.i}">{ev.eTitle_en}</span></td><td nowrap="nowrap">{ev.categories}</td><td>{ev.citNameL}</td><td class="venue" title="Open details"><span id="v_{ev.vID}_{ev.i}">{ev.vNameL}</span></td><td><div id="j_{ev.evID}" class="addJourney sprite mini" title="Add this event to MyPlanner"></div></td><td><div id="ic_{ev.evID}" class="addCalendar sprite mini" title="Import this event into iCalendar"></div></td></tr><tr class="detailRow"><td colspan="9"></td></tr>

    <!-- <list> -->

    </table>

    <!-- summary_list -->



    <div class="hr"></div>

        <div class="cont1 cont">

            <div class="col1l coll">

                <h2 class="ticket"><span></span><?php
$f = file_get_contents('http://www.classictic.com/whitelabel.php?token=16d404ed6770790ec8dd72de939f30d0&r=629&l=en&bg_image=1');
print $f;
?></h2>

                <div id="online_1">
                    <p class="noSearch">{fest.tinfo}</p>
                    <p class="noSearch"><script type="text/javascript">document.writeln('{fest.tickets}');</script></p>
                </div>

            </div>

            <div class="col1r colr">

                <h2 class="url"><span></span>Festival contact</h2>

                <p id="online_2" class="noSearch">{fest.email}<br/>{fest.site}
                </p>

            </div>

        </div>

    <div class="hr"></div>

    <!-- summary -->
<h2 class="event"><span></span>Events</h2>

    <!-- <event> -->

    <div id="detail_e_{ev.eID}">

        <h3><span></span>{ev.eTitle_en}</h3>

        <p class="date">{ev.date} {ev.startTime} - {ev.endTime}</p>

        <p class="noSearch">{ev.shortdesc}</p>

        <div class="hr"></div>

        <div class="cont2 cont">

            <div class="col2l coll">

                <h4>Programme</h4><p>{ev.program}</p>

            </div>

            <div class="col2r colr">

                <h4>Performers</h4><p>{ev.performers}</p>

            </div>

        </div>

        <div class="hr"></div>

        <h4>Tickets</h4>

        {ev.tinfo}
        <script type="text/javascript">document.writeln('{ev.tickets}');</script>

        <div class="hr"></div>

    </div>

    <!-- <event> -->
**
    <h2 class="venue"><span></span>Venues</h2>

    <!-- <venue> -->

    <div id="detail_v_{ev.vID}">

        <h3><span></span>{ev.vNameL}</h3>

        {ev.v_shortdesc}

        <div class="hr"></div>

        <div class="cont2 cont">

            <div class="col2l coll">

                <h4>Contact</h4>

                <p>{ev.zip} {ev.citNameL},<br/> {ev.address}</p>

                <p>{ev.phone} </p><p>{ev.email}</p><p><script type="text/javascript">document.writeln('{ev.site}');</script></p>

                <h3 class="GPS">GPS: {ev.lat}, {ev.lng}</h3>
                <br/>

                <pre class="showVenues sprite" title="Show festival venues"></pre>

            </div>

            <div class="col2r colr">

                <div class="imgContainer">

                    {images}

                </div>

                <h4>Further info</h4>

            {ev.findus_en}</p><p class="noSearch">{ev.parking_en}

            </div>

        </div>

        <div class="hr"></div>

        <h4>Seating plan</h4>

        <p class="noSearch">{ev.seating_plan}</p>
        <div class="hr"></div>

    </div>

</div>
        </div>
    <!-- summary -->

Thank you for your help in advance!

LastMitch
Deleted Member
 
0
 

Okay, it is a bit complex, isn't it? I am going to give you my ".tpl" extension include (used Smarty I think). Try to find the way in it to delete the event information once. I type the important part in Bold

Take out the Smarty tags then fixed the Javascript then put the Smarty tags back.

When you put back the tags make sure it's connect to the Smarty PHP code file which is index.tpl or whatever you called the file.

There's no short-cut of doing this.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: