There are two ways to get a URL like "/chocolate/sunny/session/this-is-a-record-from-the-type" for your custom content type.
1) Set the attribute bUseInTree="true" in your component, and create and manage your content in the site tree 2) Create a displaySystemFU.cfm webskin for your custom content type, however this will work best if your custom content type always uses the same URL stem. If the content doesn't always live under a common URL stem you'll need to do something like add a "navigation" formtool property to your content type so that you can choose the parent tree location (at this point, you might as well just manage it in the tree? Depends how your users need to work with the content). Here's an example of how you can use a displaySystemFU webskin to build the URL from the data in the object: https://github.com/justincarter/farcry-plugin-blogfc/blob/master/webskin/blogPost/displaySystemFU.cfm In general I'd lean towards option 1 for a relatively small number of records to manage that doesn't grow much over time, and option 2 for a larger number of records that will be known to grow over time, but of course there are exceptions :) cheers, Justin On Sunday, December 8, 2013 2:58:26 PM UTC+11, Mark Picker wrote: > > Hi, > > > > I’m having a play with setting up some custom types for a project and hit > an issue. I’m assuming this is going to be fixed with decorators but > having trouble getting this right. > > > > Let’s say I have a custom type called > > > > my custom type > > > > on the site: > > > > *http://abc.com.au* <http://abc.com.au/> > > > > and the homepage has a completely different layout to the rest of the site. > > > > Within this site I have a page using a rule that lists the teaser text for > my custom type. This pages lives at: > > > > *http://abc.com.au/chocolate/sunny/session*<http://abc.com.au/chocolate/sunny/session> > > > > Using buildlink tag in the teaser display, it creates a link to a record > from my custom type but it builds it as an absolute URL: > > > > /my-custom-type/this-is-a-record-from-the-type > > > > Rather than what I was hoping for: > > > > /chocolate/sunny/session/my-custom-type/this-is-a-record-from-the-type > > > > Or even better would be with the custom type name dropped altogether: > > > > /chocolate/sunny/session/this-is-a-record-from-the-type > > > > Whilst the link it builds “/my-custom-type/this-is-a-record-from-the-type” > does actually work and it displays using the displayPageStandard for the > type, it’s using the layout that belongs to the homepage, whereas I want it > to use the layout from the navigation node it came from i.e. /chocolate. It > really needs to appear to be in the /chocolate etc. node as it has this is > how the page builds its secondary navigation. > > > > What is the best way to get this to work? > > > > Regards, > > Mark > -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
