Have had a client with very specific formatting needs of the output from this module because of the traffic their site gets. They need to remove unset variables and decrease the character count on their pages. Unfortunately their budget does not allow us to submit a proper patch to provide this functionality. :( Not sure if this a typical request, but figured I'd pass it on.

Comments

greggles’s picture

Title: Themeable output » Provide more developer level control over omniture output

Maybe this could be handled by #182201: replace omniture.inc system with hook_omniture_variabless and document it?

If not, perhaps the proposed hook needs to be enhanced.

I'm not sure a themeable function is the right way to go for this, but maybe so.

ultimateboy’s picture

One quick fix until the hook system is implemented would be to remove all variables from omniture.module and move them all to the omniture.inc file.

However, I think that a theme function or even a tpl file might be the better way to go. This module is creating code to be included in the page and in my mind, this output should be themable. The problem with this method is that it makes creating a hook system harder. I am not completely set that the hook system is the best option, but even as I write this post I am leaning more and more in that direction.

cyberswat’s picture

Status: Active » Closed (duplicate)
greggles’s picture

Yeah, we could do both.Provide the hook first and then hand off those variables to a theme function which is responsible for outputting the actual JS...

I guess for now let's leave this as a duplicate, but if your use case makes a theme function seem valuable then certainly we can re-open it.

Dean Reilly’s picture

Status: Closed (duplicate) » Needs review
StatusFileSize
new9.72 KB

I'm reopening this ticket as the linked to ticket seems to mainly focusing on implementing hook_omniture_variables() which, while definitely helpful, doesn't provide enough control over the output of this module.

I have:
- rewritten the footer hook to use a theme function instead;
- removed the header and footer variables from hook_omniture_variables(); and
- had the variables use just their names rather than javascript fragments.

The main point of this was because I use this module in sites that run versions G and H of omniture and I don't want to have to maintain multiple versions of modules which implement hook_omniture_variables() for each version.

Status: Needs review » Needs work

The last submitted patch, omniture-use-a-theme-function-317830-5.patch, failed testing.

Dean Reilly’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, omniture-use-a-theme-function-317830-5.patch, failed testing.

bleen’s picture

please ignore the test failures here pending #1866370: add simpletests for 6.x