Katalog mit CSS bearbeiten !

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • alumares
    Contao-Nutzer
    • 01.12.2009
    • 22

    #1

    Katalog mit CSS bearbeiten !

    Hallo,

    ich habe das Problem, wenn ich ein Katalog erstelle erscheint , logischerweise, ganz oben der Header mit den Einträgen (siehe Anhang) Images, Modell etc.

    Will ich jetzt aber eine einzelne Zelle im Header z.B. "Modell" bearbeiten, weiss ich leider nicht, wie ich diese via CSS ansprechen kann, da alle Zellen der Klasse "header" zugeordnet sind ! Wie kriege ich im Backend-Bereich das so geändert, dass diese Zellen direkt ansprechbar werden (header1, header2 etc.) ?

    Habe mich bereits mit dem Thema CSS auseinandergesetzt , doch in Verbindung mit Typolight finde ich keine Lösung!

    Kennt jemand eine Lösung?
    Angehängte Dateien
  • lucina
    Administratorin
    • 19.06.2009
    • 7544

    #2
    Was möchtest Du denn bearbeiten? Die Zellen in header, oder das, was Du umkringelt hast?

    Carolina.
    Contao in Kiel: kikmedia webdevelopment | Contao-Partnerin | Contao Usergroup Kiel | github | Contao-Community-Alliance | MetaModels-Team

    Kommentar

    • alumares
      Contao-Nutzer
      • 01.12.2009
      • 22

      #3
      Hi , eigentlich waren nur die Zellen im Header gemeint da ich hoffe, dass ich dadurch auch heraus kriege, wie die einzelnen Zellen im Body-Bereich bearbeitet werden können !

      gruss a.

      Kommentar

      • MacKP
        Contao-Yoda
        • 15.06.2009
        • 13315

        #4
        Hallo alumares,
        da wirst du dir ein eigenes Template zu machen müssen.

        Anleitungen gibts dazu ja schon zu genüge...

        Viele Grüße
        Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
        [Arbeitet bei -> Paus Design & Medien]
        "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

        Kommentar

        • alumares
          Contao-Nutzer
          • 01.12.2009
          • 22

          #5
          Danke dir MacKP!

          Könnte mir jemand bitte behilflich sein, wie ich diesen Bereich abändern soll um den o.g. Effekt zu erzielen?

          Code:
          <table class="layout_simpletable" summary="Catalog Items" cellspacing="0" cellpadding="0">
          <thead class="header">
          <tr>
          <?php list($field, $heading) = each($this->entries); ?>
          <?php foreach ($heading['data'] as $field=>$data): ?>
          <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
          [COLOR="Red"]<th class="header"><?php echo $data['label']; ?></th>[/COLOR]<?php endif; ?>
          <?php endforeach; ?>
          </tr>
          </thead>
          Für jede Hilfe bin ich sehr dankbar

          Kommentar

          • MacKP
            Contao-Yoda
            • 15.06.2009
            • 13315

            #6
            Hallo alumnares,
            hier für dich noch mal die wichtigsten Links zum Katalog:




            Hier mal ein kleiner Versuch:

            Code:
            <table class="layout_simpletable" summary="Catalog Items" cellspacing="0" cellpadding="0">
            <thead class="header">
            <tr>
            <?php list($field, $heading) = each($this->entries); ?>
            <?php $i = 0; ?>
            <?php foreach ($heading['data'] as $field=>$data): ?>
            <?php $i = $i++; ?>
            <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
            <th class="header<?php echo $i; ?>"><?php echo $data['label']; ?></th><?php endif; ?>
            <?php endforeach; ?>
            </tr>
            </thead>
            Ungetestet von jemandem der nicht wirklich php kann...
            Eventuell hilft es weiter.

            Viele Grüße
            Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
            [Arbeitet bei -> Paus Design & Medien]
            "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

            Kommentar

            • alumares
              Contao-Nutzer
              • 01.12.2009
              • 22

              #7
              schade, jetzt erscheint nur: header0, header0, header0 usw. - scheint irgendwie, dass der Startwert [ i ] nicht hochzählt ??? !!!

              Wäre auch zu schön gewesen - danke dir trotzdem MacKP

              Kommentar

              • MacKP
                Contao-Yoda
                • 15.06.2009
                • 13315

                #8
                Hallo alumares,
                Fehler meinerseits.. tschuldige:

                Code:
                <table class="layout_simpletable" summary="Catalog Items" cellspacing="0" cellpadding="0">
                <thead class="header">
                <tr>
                <?php list($field, $heading) = each($this->entries); ?>
                <?php $i = 0; ?>
                <?php foreach ($heading['data'] as $field=>$data): ?>
                <?php  $i++; ?>
                <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
                <th class="header<?php echo $i; ?>"><?php echo $data['label']; ?></th><?php endif; ?>
                <?php endforeach; ?>
                </tr>
                </thead>
                Viele Grüße
                Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
                [Arbeitet bei -> Paus Design & Medien]
                "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

                Kommentar

                • alumares
                  Contao-Nutzer
                  • 01.12.2009
                  • 22

                  #9
                  YES, es hat funktioniert , ich danke dir vielmals MacKP , von wegen PHP-Anfänger

                  Nach diesem Muster habe ich jetzt noch den body-Bereich abgeändert sodass die einzelnen Felder hochgezählt werden , jedoch ohne Erfolg:
                  Code:
                  <tbody class="body<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
                  <?php foreach ($this->entries as $entry): ?>
                  [COLOR="Red"][B]<?php $i = 0; ?>[/B][/COLOR]
                  <tr class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
                  <?php foreach ($entry['data'] as $field=>$data): ?>
                  [B][COLOR="Red"]<?php  $i++; ?>[/COLOR][/B]
                  <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
                  	<td class="field <?php echo $field; ?>"><?php if (strlen($data['value'])): ?>
                  <?php if ($entry['url'] && $field == 'title'): ?><a href="<?php echo $entry['url']; ?>">
                  <?php endif; ?>
                  <?php echo $data['value']; ?>
                  <?php if ($entry['url'] && $field == 'title'): ?></a><?php endif; ?>
                  <?php endif; ?>
                  </td>
                  <?php endif; ?>
                  <?php endforeach; ?>
                  </tr>
                  <?php endforeach; ?>
                  </tbody>
                  was mach ich hier falsch ?

                  Kommentar

                  • MacKP
                    Contao-Yoda
                    • 15.06.2009
                    • 13315

                    #10
                    Hallo alumares,
                    naja.. ich bin eben php Anfänger...
                    aber dasn anderes Thema.

                    Du musst irgendwo auch noch die Ausgabe der Variablen machen: <?php echo $i; ?>

                    Eventuell solltest du da aber dann eine andere Variable nehmen und nicht wieder $i

                    Viele Grüße
                    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
                    [Arbeitet bei -> Paus Design & Medien]
                    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

                    Kommentar

                    • alumares
                      Contao-Nutzer
                      • 01.12.2009
                      • 22

                      #11
                      So, das Ding ist "****GELÖST****" @MacKP ich danke dir nochmals ganz herzlich für deine Hilfe

                      hier nochmal der vollständige Code zur fortlaufenden nummerierung einzelner Zellen (auch Klassen) im Katalog :


                      Code:
                      <table class="layout_simpletable" summary="Catalog Items" cellspacing="0" cellpadding="0">
                      <thead class="header">
                      <tr>
                      <?php list($field, $heading) = each($this->entries); ?>
                      [COLOR="Red"]<?php $i = 0; ?>[/COLOR]
                      <?php foreach ($heading['data'] as $field=>$data): ?>
                      [COLOR="Red"]<?php  $i++; ?>[/COLOR]
                      <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
                      <th class="header<?php echo $i; ?>"><?php echo $data['label']; ?></th>
                      <?php endif; ?>
                      <?php endforeach; ?>
                      </tr>
                      </thead>
                      <tbody class="body<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
                      <?php foreach ($this->entries as $entry): ?>
                      [COLOR="Red"]<?php $n++ ?>[/COLOR]
                      <tr class="item[COLOR="Red"]<?php echo $n; ?>[/COLOR]<?php echo $entry['class'] ? '  '.$entry['class'] : ''; ?>">
                      <?php foreach ($entry['data'] as $field=>$data): ?>
                      [COLOR="Red"]<?php  $k++; ?>[/COLOR]
                      <?php if (!in_array($field, array('catalog_name','parentJumpTo'))): ?>
                      <td class="field <?php echo $field; ?>[COLOR="Red"]<?php echo $k; ?>">[/COLOR]
                      <?php if (strlen($data['value'])): ?>
                      <?php if ($entry['url'] && $field == 'title'): ?><a href="<?php echo $entry['url']; ?>">
                      <?php endif; ?>
                      <?php echo $data['value']; ?>
                      <?php if ($entry['url'] && $field == 'title'): ?></a>
                      <?php endif; ?>
                      <?php endif; ?>
                      </td>
                      <?php endif; ?>
                      <?php endforeach; ?>
                      </tr>
                      <?php endforeach; ?>
                      </tbody>
                      </table>

                      Kommentar

                      • MacKP
                        Contao-Yoda
                        • 15.06.2009
                        • 13315

                        #12
                        Kein Problem.
                        Schön das du den Rest alleine geschaft hast.

                        Viel Spaß auf jeden Fall noch mit dem katalog ;-)

                        Viele Grüße
                        Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
                        [Arbeitet bei -> Paus Design & Medien]
                        "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

                        Kommentar

                        Lädt...