Frage: Frisch eingetroffen in anderem tpl

Hallo Forum,

Ich möchte die Leiste Frisch eingetroffen und die Artikel in ein anderes tpl einbinden.

Habe meine Startseite überarbeitet sodas beim Aufruf der Seite nur der Haeder…ein großes Bild in der Mitte und das _footer.tpl angezeigt wird. Weiterhin habe ich den Inhalt right und left durch ein leeres tpl ersetzt. ( Hab hier im Forum was mit teaser gelesen und jenes umgesetzt).

Nun hätte ich gern über dem Footer noch das Frisch eingetroffen mit 5 Artikeln oder so, stehen haben. Aber nun weiß ich nicht so recht wonach ich suchen muss? :confused:

Wer kann helfen?

Hallo,
in start.tpl nach “just arrived” suchen.

gruß Markus

So…ich habe in meiner start.tpl nur noch das drin stehen:

[{include file="_header.tpl" title=$template_title location="START_TITLE"|oxmultilangassign isStart=true}]

und das:


[{ insert name="oxid_tracker" title=$template_title }]

und das noch:

[{include file="_footer.tpl" }]

wie gesagt habe ich meine Startseite geändert. Habe einen teaser erstellt links und recht die Spalten damit ausgeblendet.

Nun habe ich mir aus der start.tpl das Frisch eingetroffen kopiert, also diesen Teil:

[{if ($oView->getNewestArticles()|@count)>0 }]
  <strong id="test_FreshInHeader" class="head2">
    [{ oxmultilang ident="START_JUSTARRIVED"}]

    [{if $rsslinks.newestArticles}]
        <a class="rss" id="rss.newestArticles" href="[{$rsslinks.newestArticles.link}]" title="[{$rsslinks.newestArticles.title}]"></a>
        [{oxscript add="oxid.blank('rss.newestArticles');"}]
    [{/if}]
  </strong>
  [{foreach from=$oView->getNewestArticles() item=actionproduct}]
      [{include file="inc/product.tpl" showMainLink=true product=$actionproduct size="small" testid="FreshIn_"|cat:$actionproduct->oxarticles__oxid->value}]
  [{/foreach}]
[{/if}]

[{if ($oView->getCatOfferArticleList()|@count)>0 }]
  <strong id="test_CategoriesHeader" class="head2">[{ oxmultilang ident="START_CATEGORIES"}]</strong>
  [{if ($oView->getCatOfferArticleList()|@count) is not even  }][{assign var="actionproduct_size" value="big"}][{/if}]
  [{foreach from=$oView->getCatOfferArticleList() item=actionproduct name=CatArt}]
      [{if $actionproduct->getCategory() }]
          [{assign var="oCategory" value=$actionproduct->getCategory()}]
          [{assign var="actionproduct_title" value=$oCategory->oxcategories__oxtitle->value}]
          [{if $oCategory->getNrOfArticles() > 0}][{assign var="actionproduct_title" value=$actionproduct_title|cat:" ("|cat:$oCategory->getNrOfArticles()|cat:")"}][{/if}]
          [{include file="inc/product.tpl" showMainLink=true product=$actionproduct size=$actionproduct_size head=$actionproduct_title head_link=$oCategory->getLink() testid="CatArticle_"|cat:$actionproduct->oxarticles__oxid->value  testHeader="Category_`$smarty.foreach.CatArt.iteration`"}]
          [{assign var="actionproduct_size" value=""}]
      [{/if}]
  [{/foreach}]
[{/if}]

und über dem footer.tpl eingefügt. Ergebniss: SCHRECKLICH !

Ist alles linksbündig und total versa…!

Kann mir jemand weiter helfen?

 [{include file="inc/product.tpl" showMainLink=true product=$actionproduct size="small" testid="FreshIn_"|cat:$actionproduct->oxarticles__oxid->value}]

Hi,
wie oben schön zu sehen lädt “just arrived” die produkte aus der product.tpl mit der größe “small” und die kannst Du im oxid.css nach deinem wunsch ändern.

im css datei wird baum:
#body .product.small {bla,bla } erwähnt. auch hier ist schön zu sehen das die produkte small Ihr aussehen nicht nur von der css klasse “.small” haben sondern auch von der klasse “.product”. das heist wenn du im css datei an produkten etwas änderst wirkt auf alle anderen auch, mal weniger oder mehr. besser wärs das product.tpl zu clonen und die css stellen kopieren un umbennen, denke ich.

außerdem für “frisch eingetroffen” brauchst Du nur dieses teil

[{if ($oView->getNewestArticles()|@count)>0 }]
  <strong id="test_FreshInHeader" class="head2">
    [{ oxmultilang ident="START_JUSTARRIVED"}]

    [{if $rsslinks.newestArticles}]
        <a class="rss" id="rss.newestArticles" href="[{$rsslinks.newestArticles.link}]" title="[{$rsslinks.newestArticles.title}]"></a>
        [{oxscript add="oxid.blank('rss.newestArticles');"}]
    [{/if}]
  </strong>
  [{foreach from=$oView->getNewestArticles() item=actionproduct}]
      [{include file="inc/product.tpl" showMainLink=true product=$actionproduct size="small" testid="FreshIn_"|cat:$actionproduct->oxarticles__oxid->value}]
  [{/foreach}]
[{/if}]

gruß Markus

Ich hänge mal ein Bild ran damit man es vielleicht besser erkennt was ich meine.

So soll es nicht aussehen.

ich schätze mal das du hier dein “body” verloren hast.

im header.tpl geht hier los:


        <div id="body">
        [{oxid_include_dynamic file="dyn/newbasketitem_message.tpl"}]
        [{include file="inc/error.tpl" Errorlist=$Errors.default}]

und hört in footer.tpl auf.

#body .product.small { bild mittig, artikel name grün, button laden anzeigen, rand schwarz usw.}

und wenn hier struktur nicht passt, wird style nicht angewendet…

hast du im header etwas geändert?

gruß Markus

Das einzige was ich im Header geändert habe ist folgendes:

   [{if $isStart}]
<div id="teaser">
<div class="left">
[{ include file="teaser_left.tpl" }]
</div>
<div class="right">
[{ include file="teaser_right.tpl" }]
</div>
</div>


[{/if}]
<div id="content">
[{if !$isStart}]
<div id="left">[{ include file="_left.tpl" }]</div>
<div id="path">[{ include file="_path.tpl" is_start=$isStart}]</div>
<div id="right">[{include file="_right.tpl" }]</div>
<div id="body">
[{else}]
<div id="startbody">

[QUOTE=Priester;43051]Das einzige was ich im Header geändert habe ist folgendes:

 
<div id="startbody">

[/QUOTE]

div im header fängt aber mit:

<div id=“body”> an.

wenn du “startbody” in “body” umbennenst musste es gehen…

gruß Markus

Schau hier:

Klick

Du siehst, dass die meisten Einträge aus der start.tpl entfernt sind. Deshalb auch die leeren ( teaser ) rechts und links.

Der Rest funktioniert einwantfrei.

ok. wie ich vermutet habe landest du mit deiner “frisch eingetroffen” in

<div id=“startbody”> frisch eingetroffen </div>

ich bin mir nicht sicher ob das eine saubere lösung ist, einfach folgender code in dein oxid.css unten einfügen. überflüssiger stellen solltest du aber später entfernen. danach sollten die small produkte auf der startseite richtig angezeigt werden.


/* StartBody Products */
#startbody .product{border:1px solid #555555;float:left;width:143px;height:147px;margin:0 5px 10px 5px;padding:5px 5px 5px 130px;position:relative;background:#ffffff;}
#startbody .product .picture{display:block;width: 115px;text-align: center;position:absolute;top:8px;left:8px;overflow: hidden;}
#startbody .product strong.h3 {margin:0;height: 40px; display: block;}
#startbody .product strong.h3 a{font-size: 10px;color:#000000;}
#startbody .product tt {color:#555555;display:block;}
#startbody .product .flag {width:6px;height: 6px;border:1px solid #969696;float:left;margin:3px 8px 0 0;}
#startbody .product .flag.red{background-color:#f00;}
#startbody .product .flag.orange{background-color:#ffb200;}
#startbody .product .flag.green{background-color:#00ab1f;}
#startbody .product .desc {color:#555555;font-size: 10px;}
#startbody .product .actions a{text-decoration: none; color: #555555; padding-left: 12px; background: url(bg/oxid_ce_.gif) no-repeat 0 -300px;font-size: 10px;display:block;width: 1%; white-space: nowrap;}
#startbody .product .actions a:hover{text-decoration: underline;}
#startbody .product .variants {height: 35px;}
#startbody .product .variants label{display:block;color:#555555;font-size: 9px;padding-bottom:3px;}
#startbody .product .variants select{width: 136px;}
#startbody .product .amprice {clear: left;}
#startbody .product .amount {padding-top:.5em;}
#startbody .product .amount label{margin-right:.5em;color:#555555;font-size: 10px;}
#startbody .product .cost {margin-bottom: 4px; }
#startbody .product .cost big {font-size: 18px;line-height: 100%; font-weight: bold;white-space:nowrap;}
#startbody .product .cost sup.dinfo {vertical-align:super;margin:0;padding:0;}
#startbody .product .cost sup.dinfo a{color: inherit;text-decoration: none;font-weight: bold;font-size: 13px;}
#startbody .product .cost sup.dinfo a:hover{text-decoration: underline;color: inherit;}
#startbody .product .cost small {font-weight: inherit; font-size:69% ;}
#startbody .product span.btn a { width: 135px; line-height: 19px; padding: 0px; margin-top: 0px; font-size: 10px; text-align: center; color:#ffffff; display: block;}
#startbody .product span.btn a:hover { text-decoration: none; }
#startbody .product .cost .pricefrom {line-height: 9px;}
#startbody .pricefrom {font-size: 50%;}

#startbody .product .tocart { height:18px;line-height: 1;width: 134px; background: transparent url(bg/buttons_ce_.gif) no-repeat right 0; margin:0; border: 0 none;padding:0 1px 0 0;clear:left;}
#startbody .product .tocart input{ height:18px;line-height: 1;width: 134px; background: transparent url(bg/buttons_ce_.gif) no-repeat 0 0; border:0;color:#ffffff;padding:0 0 0 23px;cursor:pointer;font-weight: bold;}

#startbody .product.head {margin-top:30px;border-top:none;border-color:#555555;}
#startbody .product.head strong.h4{display: block;margin:0;background:#ffffff; padding:8px 5px 1px 7px;height:20px; position:absolute;top:-30px;left:-1px;border-top:1px solid #555555;border-left:8px solid #555555;border-right:1px solid #555555;width:259px;line-height:20px; font-size: 11px;font-weight: bold;color:#555555;}
#startbody .product.head strong.h4 small{display:block;position:absolute;top:8px;left:49%;color:#555555;font-size:10px;font-weight: normal;}
#startbody .product.small{width:123px;height:147px;padding-left:5px;padding-top:125px;}
#startbody .product.small .variants {height: 3em; margin-bottom:2px;}
#startbody .product.small .picture {height: 118px;}
#startbody .product.small .cost {white-space:nowrap;}
#startbody .product.small .tocart {width:121px;}
#startbody .product.small .tocart input{width:121px;}
#startbody .product.small .variants select{width: 123px;}
#startbody .product.small span.btn a { width: 121px;}