This project is read-only.

Retrieving Data in the Document.cshtml View possible?

Topics: General, Troubleshooting, Writing modules, Writing themes
May 26, 2015 at 8:03 AM
Edited May 26, 2015 at 8:10 AM
Hey All, is there anyway to use linq on a content item in the Document.cshtml view?
I need to compare the current theme with records in a content item, like:
    var currentTheme = WorkContext.CurrentTheme.Name;

        var meta = (IEnumerable<TrMeta>)Model.MetaData;
    var item = meta.FirstOrDefault(i => i.ThemeName == currentTheme);
But as I can't pass anything through to the Document view [this isnt fact, more an assumption] - how would one go about this situation? Thanks for your time, Gil
May 27, 2015 at 4:00 AM
So it appears global site settings maybe of interest, but am I able to attach a content part with multiple records to "Site"? Seriously, any thoughts whatsoever will be really appreciated - Thanks all
May 27, 2015 at 8:13 AM
...apparently it's impossible - please see: - cheers Guys
Marked as answer by pgilchristb on 5/27/2015 at 12:13 AM