RE: Dynamic In Model-Glue</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=cf-talk@houseoffusion.com&q=from:%22Robert+Rawlins+%5C-+Think+Blue%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Robert Rawlins - Think Blue</span></span></a></span> <span class="date"><a href="/search?l=cf-talk@houseoffusion.com&q=date:20070315" rel="nofollow">Thu, 15 Mar 2007 05:42:29 -0800</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>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.</pre><pre> 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) [<a rel="nofollow" href="mailto:[EMAIL">mailto:[EMAIL</a> 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 _____________________________ <a rel="nofollow" href="http://blog.cutterscrossing.com">http://blog.cutterscrossing.com</a> 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. <a rel="nofollow" href="http://www.adobe.com/products/coldfusion?sdid=RVJW">http://www.adobe.com/products/coldfusion?sdid=RVJW</a> Archive: <a rel="nofollow" href="http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272723">http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272723</a> Subscription: <a rel="nofollow" href="http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm">http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm</a> Unsubscribe: <a rel="nofollow" href="http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4">http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4</a> </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft buttondisabled" accesskey="p" href="#">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd15.html#286655">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail15.html#286655">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg286656.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">RE: Dynamic <title> In Model-Glue</span> <span class="sender italic">Robert Rawlins - Think Blue</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg286656.html">Re: Dynamic <title> In Model-Glue</a></span> <span class="sender italic">Cutter (CFRelated)</span></li> <li class="icons-email"><span class="subject"><a href="msg286657.html">RE: Dynamic <title> In Model-Glue</a></span> <span class="sender italic">Robert Rawlins - Think Blue</span></li> <li class="icons-email"><span class="subject"><a href="msg286662.html">RE: Dynamic <title> In Model-Glue</a></span> <span class="sender italic">Richard Kroll</span></li> <li class="icons-email"><span class="subject"><a href="msg286670.html">Re: Dynamic <title> In Model-Glue</a></span> <span class="sender italic">Jon Clausen</span></li> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="RE: Dynamic <title> In Model-Glue"> <input type="hidden" name="msgid" value="003a01c76707$adae6cf0$090b46d0$@rawlins_thinkbluemedia.co.uk"> <input type="hidden" name="relpath" value="cf-talk@houseoffusion.com/msg286655.html"> <input type="submit" value=" Robert Rawlins - Think Blue "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="cf-talk@houseoffusion.com"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search cf-talk"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/cf-talk@houseoffusion.com/">cf-talk - all messages</a></li> <li class="icons-about"><a href="/cf-talk@houseoffusion.com/info.html">cf-talk - about the list</a></li> <li class="icons-expand"><a href="/search?l=cf-talk@houseoffusion.com&q=subject:%22RE%5C%3A+Dynamic+%3Ctitle%3E+In+Model%5C-Glue%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="#" title="p">Previous message</a></li> <li class="icons-next"><a href="msg286656.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> <a href="#"><img src="/cf-talk@houseoffusion.com/logo.png" alt="cf-talk"></a> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">003a01c76707$adae6cf0$090b46d0$@rawlins_thinkbluemedia.co.uk</li> </ul> </div> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9d7b2910bffede81',t:'MTc3MjczNTA5Ng=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>