I am building a eCommerce style site, and my question is about displaying nodes from a source other than $currentPage. How can I target one of my categories nodes? To build a product I have a raiting property int collection for a number 1 - 5. (would this be better handled by a dropdown, or radio set?) So essentially the homepage will pull say the top 5 (5 star) items.
So far I have the grid generating thumbnails and links but I have to place it on a node with product children due to my unsuccessful searches for node targeting.
You have all of the published content available - you just need to know how to get it. A good trick is to grab some good reference points, instead of getting everything off of $currentPage, which quickly becomes unreadable. So for example, I always create a $siteRoot variable just after the $currentPage parameter, like this:
Product Grid / List nodes from "alternate" page
I am building a eCommerce style site, and my question is about displaying nodes from a source other than $currentPage. How can I target one of my categories nodes? To build a product I have a raiting property int collection for a number 1 - 5. (would this be better handled by a dropdown, or radio set?) So essentially the homepage will pull say the top 5 (5 star) items.
So far I have the grid generating thumbnails and links but I have to place it on a node with product children due to my unsuccessful searches for node targeting.
Hope I made sense, and thanks in advance.
So far:
Hi Grant,
You have all of the published content available - you just need to know how to get it. A good trick is to grab some good reference points, instead of getting everything off of
$currentPage
, which quickly becomes unreadable. So for example, I always create a$siteRoot
variable just after the$currentPage
parameter, like this:This makes it very easy to grab stuff from other places, e.g. your categories - if they're placed outside your site, you'd do this:
Otherwise, if they're placed below the home node:
Then to get the name of the Category that your category property on
$currentPage
is pointing at, do this:/Chriztian
Wow, very informative thank you got my solution and a best practice...Thanks, again.
-G
is working on a reply...