Re: Best way to display a dmnews item's category link

Marco van den Oever <[email protected]>
Newsgroups gmane.comp.cms.farcry.devel
Message-ID <[email protected]>
Hi Sean thanks for answering, as you see now i match through the label 
value "WHERE label = '#category.categoryLabel#'" so because there are 2 of 
the same label values there i get the wrong (first) objectid value.

 <!--- get news category --->
   <cfquery name="category" datasource="aquariusagenieuw">
  SELECT categoryLabel
  FROM dmcategory 
  WHERE ObjectID = '#stObj.catNews#'
  </cfquery>

  <!--- get category dmhtml objectid--->
   <cfquery name="dmhtmlobjectid" datasource="aquariusagenieuw">
  SELECT ObjectID 
  FROM dmhtml 
  WHERE label = '#category.categoryLabel#'
  </cfquery>

  <skin:buildLink objectid="#dmhtmlobjectid.ObjectID#" title=
"#category.categoryLabel#">#category.categoryLabel#</skin:buildLink>

So what's the right way? I assume this isn't :)

Thanks.

Op zaterdag 16 februari 2013 21:22:45 UTC+1 schreef Sean Coyne het volgende:
>
> Can you create a Gist or Pastebin of the code you are using?
>
> On Friday, February 15, 2013 7:59:07 PM UTC-5, Marco van den Oever wrote:
>>
>> Hi all, i have a problem...
>>
>> I have created categories for my news categories and also link 
>> categories, so i used the same categories for news and links.
>> I also created dmhtml objects for news and links categories, so in dmhtml 
>> i have 2 of the same title's for every category.
>>
>> Now i want to display a category link on the dmnews item's page, that 
>> refers to the dhtml object that it belongs to.
>>
>> If i use the buildlink tag and fill in the stObj.catNews value of the 
>> news item i get a:
>>
>> "key [TITLE] doesn't exist in struct"
>>
>> Am i doing something wrong?
>>
>> Thanks.
>>
>

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
--- 
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.