Nice work Cutter,
That was a short and sweet tutorial and gives me a good kick in the right
direction, I wasn't aware that I could set values in the XML manually like
that. There are a couple of ideas or questions I'd like to run past you
though.
Firstly is regarding the database driven titles, this seems like a fair
enough concept to me, but I'm a little worried about making database calls
on every page just to collect titles and keywords etc, so what I'm thinking
is building a bean on application start which contains an array with all the
database information in, this way when each page loads it'll only need a
quick reference to the bean in memory, rather than pulling from SQL, does
that sound like a reasonable idea?
Also, I notice in your tutorial that at the top of your template view you
set all the drawn details from the framework into the variables scope like
so.
<cfset variables.pageTitle = "My Site: " />
<cfset variables.pageTitle = variables.pageTitle &
viewState.getValue("pageTitle","Home") />
<cfset variables.pageKeywords = viewState.getValue("pageKeywords","") />
<cfset variables.pageDescription = viewState.getValue("pageDescription","")
/>
<cfset variables.additionalStyleSheets =
viewState.getValue("additionalStyleSheets","") />
<cfset variables.additionalScripts =
viewState.getValue("additionalScripts","") />
<cfset variables.siteSection = viewState.getValue("siteSection","") />
Is there any reason behind doing this? Or would the app be just as happy for
me to reference it as
<cfoutput>#viewState.getValue("pageKeywords","")#</cfoutput>?
Thanks again for the advice,
Rob
-----Original Message-----
From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED]
Sent: 15 March 2007 13:24
To: CF-Talk
Subject: Re: Dynamic <title> In Model-Glue
Robert,
See the tutorial on my blog, "Making The View". My last installment
covered MG:U, and includes a basic example (though probably better to db
the info and pull it in per page view). It should at least get you started.
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com
Robert Rawlins - Think Blue wrote:
> Hello Guys,
>
>
>
> Has anyone done any work with dynamic titles and meta tags using MG? I'm a
> little lost on how best to achieve it, the idea is the content for the
tags
> will change for every page to make them more relevant to the exact
content.
>
>
>
> I've using the standard dspTemplate.cfm method at the moment to wrap my
> contact in a universal template. I'd love to hear what you guys are doing
to
> achieve a little more flexibility in this template.
>
>
>
> Rob
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272723
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4