I have got a page, which has got different categories and serach and filters. It's a news page which seperates to News, blog, events and all (using uDateFoldersy ).... then different category of the news, which i have used the nodepicker for it. and then i have the filter of year(dropdown list) and the months....
what i am not sure about, shall i put all of them in one macro? or can i call one macro in the other macro?
It's still very difficult for me to play around the macro(razor) when having different controls in one page.
What version of Umbraco are you using? Why do you still want to put in a macro? Since Umbraco 7 the default templates are Razor views and you can do it in there instead of a macro. I would also suggest to do all the logic in a controller and only use the view to render html. You can have a look at the Hybrid Framework for some examples.
Do you think it's better i get this package and use different macros for retviring information for one page. like if i put the dropdown for archive year and months in one macro and i pass the info to the main macro.
The problem is the macro reads once and if i want to pass different argument i'll need to pass the argument through the url and it's not really a good practic, is it?
Macro and different controls
I have got a page, which has got different categories and serach and filters. It's a news page which seperates to News, blog, events and all (using uDateFoldersy ).... then different category of the news, which i have used the nodepicker for it. and then i have the filter of year(dropdown list) and the months....
what i am not sure about, shall i put all of them in one macro? or can i call one macro in the other macro?
It's still very difficult for me to play around the macro(razor) when having different controls in one page.
Can someone help me please?
Thanks a lot in advance,
Mitra
Hello,
What version of Umbraco are you using? Why do you still want to put in a macro? Since Umbraco 7 the default templates are Razor views and you can do it in there instead of a macro. I would also suggest to do all the logic in a controller and only use the view to render html. You can have a look at the Hybrid Framework for some examples.
Jeroen
I use Umbraco v6.2.4
I have written all of the section in a scripting files and calling them via macro in my template.
I was wondering if i could move them around and call different scripts in one main script for this page.
With this package it's possible to call a macro from inside another macro: https://our.umbraco.org/projects/website-utilities/razor-components
So with that you call different scripts in one main script.
Jeroen
Thank you.
Do you think it's better i get this package and use different macros for retviring information for one page. like if i put the dropdown for archive year and months in one macro and i pass the info to the main macro.
The problem is the macro reads once and if i want to pass different argument i'll need to pass the argument through the url and it's not really a good practic, is it?
Cheers,
Mitra
You can pass information from 1 marco to another if you want. You can see an example on the package page. Is that what you want/
Jeroen
Thank you very much. I am trying to use form's post submit. Meanwhile I'll try to use the package for some other part in my project.
Thanks,
Mitra
is working on a reply...