Reply to comment

Drupal Views 2: Anrisstexte und andere Inhalte auf Node verweisen

Bei der Umstellung unserer Rollerseiten auf Drupal wollten wir die Anrisstexte auf den Node verweisen.
Da eine entsprechende Möglichkeit nicht generell eingebaut ist, muss man sich eines Tricks bedienen, der sehr elegant ist:

  1. Ein Feld "Node - ID (Node: Beitrag - Id)" dem View hinzufügen (vorzugsweise als erstes Feld), das ausgeblendet wird (falls es nicht ohnehin benötigt wird)
  2. Die Option "Dieses Feld als Link anzeigen" aktivieren und hier folgendes eintragen: "node/[nid]" (aus dem Replacement-Pattern unterhalb, daher muss das NID-Feld auch als erstes in der Liste stehen)
  3. Um suchmaschinenoptimiert zu arbeiten, kann als ALT-Text nun sogar noch ein anderes Feld angegeben werden, hier empfiehlt sich beispielsweise der Titel ("[title]")
  4. Das war's schon! Das Feld ist nun korrekt auf den Beitrag verlinkt und wird sogar, wenn mod_rewrite aktiviert und eine Ersetzung angegeben ist, korrekt mit einem Alias verlinkt.

Trackback URL for this post:

http://julian.pustkuchen.com/en/trackback/52

Reply

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><blockquote>
  • Lines and paragraphs break automatically.
  • Pairs of<blockquote> tags will be styled as a block that indicates a quotation.
  • You can enable syntax highlighting of source code with the following tags: <c>, <cpp>, <css>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <smarty>, <xml>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.