Code Monkey home page Code Monkey logo

Comments (9)

jskeet avatar jskeet commented on June 25, 2024

Ooh, it looks like I can put a _ViewStart.md in each view directory, and that will be picked up. That will be a fine solution for me...

from markdownviewengine.

jskeet avatar jskeet commented on June 25, 2024

Nope, that doesn't work - I've tried a few things, and although a single _ViewStart.md with @layout _Layout looks like it might work, I don't see any way of specifying a layout relative to the page itself.
I think I can make do with two controllers, although it's a bit ugly...

from markdownviewengine.

hishamco avatar hishamco commented on June 25, 2024

@jskeet I change the directives little bit last week but I didn't push the updates yet, hope I will do it soon.
Regarding _ViewStart it is limited now so the engine only able to pick it from the shared folder

from markdownviewengine.

hishamco avatar hishamco commented on June 25, 2024

Uploading the latest change will fix the issue. Also I will look to support multiple _ViewStart so you will be able to add one in each folder

from markdownviewengine.

jskeet avatar jskeet commented on June 25, 2024

RIghto - will use different controllers just for now, but fix it later - thanks :)

from markdownviewengine.

jskeet avatar jskeet commented on June 25, 2024

No need for multiple _ViewStart in this particular case, so long as there's a way of making a single @layout directive work relative to the rendered Markdown page - I can just call the layout _Layout.md in every directory.

from markdownviewengine.

hishamco avatar hishamco commented on June 25, 2024

Yes you can, but it's tedious 😄, we can support _ViewStart per folder such as Razor Engine

from markdownviewengine.

hishamco avatar hishamco commented on June 25, 2024

After looking to the latest code the @page directive introduces a property called Layout instead of the @Layout directive, so this absolutely will solve your issue

from markdownviewengine.

hishamco avatar hishamco commented on June 25, 2024

@jskeet after this commit ac6800b this should be fixed. You can have a look to this https://github.com/hishamco/MarkdownViewEngine/blob/master/samples/MarkdownViewEngineSample/Views/Home/Index.md and https://github.com/hishamco/MarkdownViewEngine/blob/master/samples/MarkdownViewEngineSample/Views/Home/About.md which there are using different layouts

from markdownviewengine.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.