Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon Ivar Nielsen 24 posts 96 karma points
    Sep 13, 2014 @ 06:40
    Jon Ivar Nielsen
    0

    Passing URL parameter - MVC

    Hi

    I'm new to U7 MVC and I want to access a URL parameter 'date' in my controller. The URL will have the form http://mydomain.com/image/2014-09-13 where 2014-09-13 is the 'date' parameter. The 'date' parameter will be used to check for existing images. The controller will be used on the 'image' node and this node will have no children.

    I will use 7.1.6 and understand there will be some custom MVC routing involved. How will I need to set up the custom routing and how can I access the parameter in the controller?

    :o)
    Jon Ivar

  • Simon-Pierre Tremblay 1 post 21 karma points
    Nov 13, 2014 @ 14:24
    Simon-Pierre Tremblay
    0

    Hi Jon,

    did you finally found an answer to your question. If yes can you share it. I was looking for the same question.

    Regards,

    Simon-Pierre

  • Jon Ivar Nielsen 24 posts 96 karma points
    Nov 14, 2014 @ 01:31
    Jon Ivar Nielsen
    0

    Hi Simon-Pierre

    Sadly, no. I know this is possible but I have not found any resources describing this.

    :o)
    Jon Ivar

  • Henk Jan Pluim 15 posts 67 karma points
    Nov 14, 2014 @ 16:48
    Henk Jan Pluim
    0

    Hi Jon and Simon-Pierre,

    I think next blog article explains what you want if i correctly understand you both.

    Custom MVC Routing

    1. So first of all you need to add your own startup handler
    2. Next you create your own Controller derived from PluginController

    Hopefully this article will help you,

    Regards,

    Henk Jan Pluim

Please Sign in or register to post replies

Write your reply to:

Draft