Hi all. I have a view where retrieve the last 10 blog post. I need to retrieve this fields: title (linked to the blog post), post date, and teaser. I have make the view and it works, but not at 100%. The problem is that the link in the title is "node/X" and not the alias created via pathauto. Pathauto is configurated and running (alias for node/X works). This is my template file (views-view-fields--categoriespage-fitness.tpl.php):
<div class="AntNewsCategoria borderBottomCateg"> <img height="63" width="103" alt="image" src="/sites/fitnesspeople.it/themes/fp_001/images/fotoAntepriNews.jpg"/> <h3><?php echo $fields['title']->content; ?></h3> <p><span class="data"><?php echo $fields['created']->content; ?> - <?php echo $fields['teaser']->content;?></p> </div>
Where is the problem ?
M.
Use global_redirect module if you would like to have always the node/x redirected to the alias.
Make sure the language of text items is set correctly otherwise pathauto will not work well. ie if you have only one language that is active in your site it's better to leave the language of all items as "language independant", check on /admin/content/node/overview what language your content has. Change to language independant if needed with the plugin http://drupal.org/project/languageassign.
Hans www.koba.be
2009/11/4 Michel Morelli michel@ziobuddalabs.it
Hi all. I have a view where retrieve the last 10 blog post. I need to retrieve this fields: title (linked to the blog post), post date, and teaser. I have make the view and it works, but not at 100%. The problem is that the link in the title is "node/X" and not the alias created via pathauto. Pathauto is configurated and running (alias for node/X works). This is my template file (views-view-fields--categoriespage-fitness.tpl.php):
--
Hans Rossel KOBA Webdesign bvba Beukenlaan 56 9051 Gent (Sint-Denijs-Westrem) Belgium BTW 0817.931.516 +32.9.334.52.60 +32.472.79.32.16 www.koba.be info@koba.be
Thanks Hans. Now it works.
M.
On Wed, 04 Nov 2009 KOBA | Hans Rossel wrote:
Use global_redirect module if you would like to have always the node/x redirected to the alias.
Caution if you're using xmlsitemap and install this module you will need to adjust the module weights for xmlsitemap to be after global_redirect. Otherwise the sitemap.xml will contain links for both the alias and the src url.
-- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/