Hi Elise,

the current query graph is empty/unbound in the headIncludes, unless a _base=... argument has been passed into the SWP service call. In calls to the EDG editors (URLs ending with .editor), usually no _base is specified and instead ?projectGraph is used to set the query graph for the body (ui:prototype). So unless you have control over setting the _base, you need another solution.

It SHOULD be possible to inject CSS styles into the head even from the ui:prototype. For example using jQuery it could be something like

<script>$('head').append($('<link ... />'))</script>  <!-- Holger hasn't actually tried this -->

So you could try to get such a <script> execute from the ui:prototype, which then allows you to access the query graph. If you already have some custom SWP element in your screen then this should be easy. Otherwise, you could add a ui:override to an existing element that is always on your page. If you can let us know what the surrounding SWP looks like, I could give further guidance.

Another thought is: if the head is different for each user, could you derive the query graph from each user, using smf:currentUserName()? This would make it independent from the query graph.

Regards,
Holger


On 24/03/2019 6:34 am, Elise Lustenhouwer wrote:
Hi,

We're working with SWP to create new views on our data. For our different target audiences we've got multiple web styles. This is why our <head> part is different for each style, pointing to different favicons, CSS's and JavaScripts. The variables are stored in the same graph with the rest of the data.

Is there a way to acces the ui:queryGraph in ui:headIncludes to set the context like in ui:prototype?

Thanks in advance,
Elise

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to