root/branches/MidCOM_2_8/org.routamc.photostream/style/render_feed_item.php

Revision 11037, 1.1 kB (checked in by rambo, 3 years ago)

Some sanity checking to the automatiuc request_switch generation
Basic feed outputs seem to work, now just to get the media tags
working properly (and calls to add_link_head to supported handler to
add the rel=alternate links)

Line 
1 <?php
2 //$data =& $_MIDCOM->get_custom_context_data('request_data');
3 $prefix =& $data['prefix'];
4 $view = $data['photo_view'];
5 ?>
6 <div class="org_routamc_photostream_photo">
7     <h1><?php echo $view['title']; ?></h1>
8
9     <div class="photo">
10         &(view['photo']:h);
11     </div>
12
13     <div class="description">
14         &(view['description']:h);
15     </div>
16     <?php
17     // List tags used in this photo page
18     $tags_by_context = net_nemein_tag_handler::get_object_tags_by_contexts($data['photo']);
19     if (count($tags_by_context) > 0)
20     {
21         echo "\n<dl class=\"tags\">\n";
22         foreach ($tags_by_context as $context => $tags)
23         {
24             if (!$context)
25             {
26                 $context = $_MIDCOM->i18n->get_string('tagged', 'net.nemein.tag');
27             }
28             echo "    <dt>{$context}</dt>\n";
29             foreach ($tags as $tag => $url)
30             {
31                 echo "        <dd class=\"tag\"><a href=\"{$prefix}tag/{$data['user_url']}/{$tag}\">{$tag}</a></dd>\n";
32             }
33         }
34         echo "</dl>\n";
35     }
36     ?>
37 </div>
38
Note: See TracBrowser for help on using the browser.