There are sometimes situations where you need to use the output of a query field in the raw html source.
This might be for some script, styling, or links. Before proceeding down this route check that the system doesn't natively support what you need direct via styling dialogs etc.
So for this example, you might want to set the background color of a table.
The HTML/CSS for this would be something like
<table style="background-image: url('sunset.png');">
The trick is to retrieve the path and filename from the query and insert that at the correct location.
Start by adding the field to the table.
Then add it to your custom view, and go to source mode in the editor.
The Embed markup for the field should contain a part which is
Embed.123.345
(where the number will be unique to your embed)
Copy this and place it into your desired markup location, and surround it with _# #_
ie so your finished markup looks like:
<table style="background-image: url(' ');">
You can then remove the original field embed that you copied the Embed information from. |