Farcry 6.08 with FarcryCMS plugin

18 views
Skip to first unread message

chris

unread,
Dec 20, 2010, 4:35:27 PM12/20/10
to farcry-user
Hi,

I'm new to farcry and i have some issues and hopefully someone can
lead me to the right direction. I would like to use the dmNews in the
Site Tree so i can view news items in my conten t. The only way i know
how to do it is to create a include in the site tree and create a
custom made displayTypeBody.cfm in the farcry\projects\[projectname]
\webskin\dmNews and then do a query on al the news items in the
displayTypeBody.cfm. But it doesnt seem logical, i think there is more
to it to view news items. Can someone tell me how its done properly
with example because of the lack on docs.

Thanks in advance,

Chris

AJ Mercer

unread,
Dec 20, 2010, 9:16:17 PM12/20/10
to farcr...@googlegroups.com
New Items are generally display via a rule.
You add a HTML page to the site tree
then preview that page, display containers (rules), then ad a new Rule

Some more info here




--
You received this message because you are subscribed to the Google Groups "farcry-user" group.
To post to this group, send email to farcr...@googlegroups.com.
To unsubscribe from this group, send email to farcry-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/farcry-user?hl=en.




--

AJ Mercer
<webonix:net strength="Industrial" /> | <webonix:org community="Open" />
http://twitter.com/webonix

chris

unread,
Dec 26, 2010, 10:37:57 AM12/26/10
to farcry-user
Sorry for the late response, but thank you ;) i am now a lot further
with farcry.
But i got another question. I've created a custom webskin in de dmHTML
folder with a container. i added a rule.
Now the dmNews shows the teaser webskin in the container. but it has
a link to the objectid of the newsitem. when i click it. it goes to
the dmNews Webskin DisplayStandardPage, what is the best way to do the
whole site in one webskin. because de dmHTML is now the leading one.
its not logical to maintain two or more webskins with te same layout,
considering, adding more content types to the project in the future.

Thanks in advance,

Chris

On Dec 21, 3:16 am, AJ Mercer <ajmer...@gmail.com> wrote:
> New Items are generally display via a rule.
> You add a HTML page to the site tree
> then preview that page, display containers (rules), then ad a new Rule
>
> Some more info here
>    https://farcry.jira.com/wiki/display/FCDEV50/UNIT+04+-+Webskins+I
>
> On 21 December 2010 05:35, chris <cvanderp...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > I'm new to farcry and i have some issues and hopefully someone can
> > lead me to the right direction. I would like to use the dmNews in the
> > Site Tree so i can view news items in my conten t. The only way i know
> > how to do it is to create a include in the site tree and create a
> > custom made displayTypeBody.cfm in the farcry\projects\[projectname]
> > \webskin\dmNews and then do a query on al the news items in the
> > displayTypeBody.cfm. But it doesnt seem logical, i think there is more
> > to it to view news items. Can someone tell me how its done properly
> > with example because of the lack on docs.
>
> > Thanks in advance,
>
> > Chris
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "farcry-user" group.
> > To post to this group, send email to farcr...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > farcry-user...@googlegroups.com<farcry-user%2Bunsubscribe@googlegr­oups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/farcry-user?hl=en.
>
> --
>
> *AJ Mercer*
> <webonix:net strength="Industrial" /> <http://webonix.net> | <webonix:org
> community="Open" /> <http://webonix.org>http://twitter.com/webonix- Hide quoted text -
>
> - Show quoted text -

AJ Mercer

unread,
Dec 26, 2010, 6:26:16 PM12/26/10
to farcr...@googlegroups.com
In the webskins directory you will see a directory called types, this
is the last place Farcy looks for a file

So if you only have displayPageStandard in there (and none in dmHTML
or dmNews) it will be used for both types

> To unsubscribe from this group, send email to farcry-user...@googlegroups.com.

Sean Coyne

unread,
Dec 27, 2010, 11:14:19 AM12/27/10
to farcr...@googlegroups.com
In addition to AJ's response, ideally in your displayPageStandard webskins you will only have the design code relative the target content types.  The generic design aspects should be in displayHeaderStandard and displayFooterStandard webskins that can be shared by all content types.

chris

unread,
Dec 27, 2010, 3:06:16 PM12/27/10
to farcry-user
That would be great if a subnavigation on the left is not needed, but
in my case i have one.
Speaking about the navigation. in some cases the submenu doesnt show
because there are no children.
only in my case i use a div around the subnavigation. But i dont want
the div in the lay-out if there are no children. what is the best way
to hide the div. For de subnavigation i use:

<div id="leftmenuNavigation">
<skin:genericNav foo=bar>
</div>

I thought i could make an includes directory in de webskin folder of
my project and than put a file in it with the code
<cfsavecontent variable="leftMenu">
<cfoutput>
<skin:genericNav foo=bar>
</cfoutput>
</cfsavecontent>

And then in the displayPageStandard:

<include template="/farcry/projects/[applicationname]/webskins/
includes/include_leftmenu.cfm">
<cfif len(leftMenu) gt 0>
<div id="leftmenuNavigation">
#leftMenu#
</div>
</cfif>
But that doesnt give any output and isnt very clean either. is there a
better way?

Thank you so much for the support ones again.

Chris van der Poel (The Netherlands)

Jeff Coughlin

unread,
Dec 27, 2010, 10:24:41 PM12/27/10
to farcr...@googlegroups.com
Chris,

I'm not sure it's ideal, but you could do a getDescendants() and see if it returns any records before deciding to output the div for your subnav .

Example: (note: If you're trying to build the subnav from a specific level, keep that in mind in case you need to use a different objectId instead of the current page navId)
<cfscript>
  aNavfilter = ["status IN (#listQualify(request.mode.lValidstatus, "'")#)"];
  qSubNav = application.factory.oTree.getDescendants(objectId=request.navId, depth=1, aFilter=aNavFilter, bHideEmptyNodes=true);
</cfscript>

<cfif qSubNav.recordCount gt 0>
  <div id="leftmenuNavigation">
    <skin:genericNav foo=bar />
  </div>
</cfif>

--
Jeff Coughlin
Web Application Developer

chris

unread,
Dec 28, 2010, 4:52:42 AM12/28/10
to farcry-user
Hi Jeff,

Thanks for the suggestion, but i thought of different approach, that
seems more efficient because you don't have to call the tree function
(Query) twice, and it works now because of the webskin tag import in
the cfsavecontent variable.

<!--- The file include_leftMenu.cfm --->
<cfsavecontent variable="leftMenuOutput">
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin">
<cfoutput>
<skin:genericNav navID="#request.navid#"
functionMethod="getBloodline"
functionArgs="jointable=""dmNavigation"",
status=""#request.mode.lvalidstatus#""" id="nav-secondary"
startlevel="3" bActive="true">
</cfoutput>
</cfsavecontent>
<!--- ---->

<!--- The file DisplayPageStandard ---->
<cfinclude template="farcry/projects/#application.applicationname#/
webskin/includes/include_leftMenu.cfm">
<cfif len(leftMenuOutput) gt 0>
<div id="leftNavContainer">
#LeftmenuOutput#
</div>
<cfelse>
<!--- different Layout --->
</cfif>



On Dec 28, 4:24 am, Jeff Coughlin <j...@jeffcoughlin.com> wrote:
> Chris,
>
> I'm not sure it's ideal, but you could do a getDescendants() and see if it returns any records before deciding to output the div for your subnav .
>
> Example: (note: If you're trying to build the subnav from a specific level, keep that in mind in case you need to use a different objectId instead of the current page navId)
> <cfscript>
>   aNavfilter = ["status IN (#listQualify(request.mode.lValidstatus, "'")#)"];
>   qSubNav = application.factory.oTree.getDescendants(objectId=request.navId, depth=1, aFilter=aNavFilter, bHideEmptyNodes=true);
> </cfscript>
>
> <cfif qSubNav.recordCount gt 0>
>   <div id="leftmenuNavigation">
>     <skin:genericNav foo=bar />
>   </div>
> </cfif>
>
> --
> Jeff Coughlin
> Web Application Developerhttp://jeffcoughlin.com
> > For more options, visit this group athttp://groups.google.com/group/farcry-user?hl=en.- Hide quoted text -

Jeff Coughlin

unread,
Dec 28, 2010, 5:46:49 AM12/28/10
to farcr...@googlegroups.com
Same concept.  I noted it wasn't ideal (because of the extra query call).  There are even better ways to do it (depending on your full layouts), but what you have should work fine for your needs.  Glad you got it working.

Regards,

--
Jeff Coughlin
Web Application Developer
Reply all
Reply to author
Forward
0 new messages