Yes- this code needs to be inside an entries tag - otherwise you have no access to the values in you custom fields n
Mainly the same idea as a text field. Ive used this approach elsewhere so it will work- might just have to finess the code a bit.
ok - 2 points:
- means we are wrapping the entire template code within the body tag with a channels entries tag - but the wrapped template code itself has a channels entries tag too for the single entry. is this optimal?
- if this is the same as using a text field, then what is the advantage of going this route - extra channel to hold template names to be used in a dropdown field?
I have setup the whole thing now, but haven’t wrapped it in the channels entries tag because of my concerns with the first point above ...
i.e.