Mach-II/Mach-II-Framework — Issue #62: IDEA: Allow script and style links
Author: mpwoodward
Created: 2012-03-01 19:03:09+00:00
State: open
Labels: enhancement

(Moved from http://trac.mach-ii.com/machii/ticket/521)

ust hacking around abit, I think it is tedious to have to include all the scripts and style tags, and this could go for all "HEAD" elements.

It would be nice to be able to do the following:

```

```

Changed 2 years ago by miketaake@hotmail.com

attachment framework.zip added
ViewManager?.cfc and ViewContext?.cfc in a .zip file.

comment:1 follow-up: ↓ 2 Changed 2 years ago by peterfarrell

Cc kurtwiersma, mattwoodward, brianfitgerald, mikerogers, adrianscott added
Keywords html elements added
Priority changed from blocker to minor
Milestone set to Uncategorized
Thanks for the idea and I appreciate you taking the time to submit an idea. Definitely something the team will discuss.

Have you looked at the new view custom tag library bundled with Mach-II 1.8 which essentially does what you want (just not expressed in XML as they are CFML custom tags)?

comment:2 in reply to: ↑ 1 Changed 2 years ago by anonymous

Replying to peterfarrell:

Thanks for the idea and I appreciate you taking the time to submit an idea. Definitely something the team will discuss.

Have you looked at the new view custom tag library bundled with Mach-II 1.8 which essentially does what you want (just not expressed in XML as they are CFML custom tags)?

Actually, I hadn't, nor had I looked at the HTMLHelperproperty. Both of these will meet the task.

But it would be nice to "wire" into the config files for page-views the dependencies of the views along with scripts, styles, metatags and images, etc. Then, the scripts and styles could be evaluated or linked automagically into the HEAD section.

comment:3 Changed 2 years ago by peterfarrell

We'll discuss the feature request, but with the introduction of view-loaders in 1.8 -- it appears we are getting way from having to define the page-views section of the XML for a convention based approach. Again, the view custom tag library (which behind the scenes is driven by the html helper property) offers everything you need in a CFML based approach.

For scripts/styles that are consistently used, I'd look at the asset packages that the html helper property offers and using a layout subroutine to eliminate repetitive code.

Feel free to bring this up on the Google Group list for more ideas / suggestions on what the community is doing as a whole. The tickets on trac are only monitored by the team and therefore you won't get always get a response as quickly.