Gleich vorweg: Dieser Weg ist eine Mischung aus webEdition-Repeat und PHP.

1. repeat, wobei die ClassID anzupassen ist, je nachdem auf welche Objekte welcher Klasse man zugreifen möchte.

[cc lang=”html” escaped=”true” width=”500″]

<we:listview type=”object” name=”refliste” order=”we_id” desc=”false” rows=”10″ classid=”1″ languages=”de_DE”>

<we:ifFound>
<we:repeat>

<?php $IdOfCurrentObject = $lv -> DB_WE -> f(“OF_ID”); ?>

</we:ifFound>

</we:repeat>

</we:listview>

[/cc]

2. auf den Inhalt des Objektes zugreifen:

<?php

// includieren von we.inc.php => includiert alle wichtigen Libs und Conf-Dateien

include_once($_SERVER[“DOCUMENT_ROOT”] . “/

webEdition

/we/include/we.inc.php”);

// includieren der Klasse we_objectFile

include_once($_SERVER “DOCUMENT_ROOT”] . “/

webEdition

/we/include/we_modules/object/

we_objectFile.inc.php”); // Erzeugen eines neuen we_objectFile Objekts $obj = new we_objectFile(); // Objekt mit ID initialisieren $obj->initByID(3); // 3 => /adressen/CMS-Halle

// Ausgabe der Adresse

print “Name1: ” . $obj->getElement(“Name1”) . “<br>”; print “Name2: ” . $obj->getElement(“Name2”) . “<br>”; print “Strasse: ” . $obj->getElement(“Strasse”) . “<br>”; print “PLZ: ” . $obj->getElement(“PLZ”) . “<br>”;

print “Ort: ” . $obj->getElement(“Ort”) . “<br>”; print “Telefon: ” . $obj->getElement(“Telefon”) . “<br>”; print “Email: ” . $obj->getElement(“Email”) . “<br>”; print “URL: ” . $obj->getElement(“URL”) . “<br>”;

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin