I'm having a question regarding the DateField, which is probably more related to my little (c#) coding knowledge.
I want to use the DateField but access the Day, Month and Year properties seperated.
So I figured I would've to cast or parse it to DateTime. The Docs state something about implicit operators.
Couldn't really find a solution which makes sense/ which I understand. Tried some tutorials where I'm not entirely sure what am I doing.
Could I get a little hint how to do it? I feel like I'm trying way to complicated stuff 😅
One of the weird things I tried: https://puu.sh/FRtPf/c7623b08d6.png
I've got another question which is rather conceptual.
I'm trying to make a seminars filtering page like so:
Now we have seminars which occur 12 times per year.
So I figured I'm going to make a Page Template with a List of seminar classes.
Works fine as seen on the prototype screenshot. But how could I make the DateTime/DateField via Frontend filterable by date and add up to 12 dates to it?
I fear I would've to create 12 DateFields per seminar and Loop them with a For Loop?
2 already look not so great in the Manager and in the .cshtml.
I'm probably best of with creating a StringField and using pipes | to seperate all dates and then use StringSplit + convert those Splits to DateTime?
Hope I'm asking not too stupid stuff 🙈
CalendarFieldthat can store all of the information you want and let the user select the dates they want (or if something should be recurring). This of course requires a bit of coding and knowledge of Piranha & Vue.js. The simpler solution would be to add a List Region to your
IList<DateField>) where the user can add one or more dates for the seminar.
Hmm I probably should reconsider my concept. Didn't explain it perfectly. I created a "AcademyPage" which has a Region IList<Regions.Seminar> which is shown in the manager just like the Heros or Teasers.
Every List item has all information for a Seminar stored and I just wanted to show that data via a Modal. But I'm probably better off creating a Page for every seminar and then somehow filter each seminar on the Academy Page 🤔
Creating a custom CalendarField sounds great but I fear I won't have enough knowledge + time for this. Barely created 2 custom Blocks. My Boss wants the page live in 2 weeks even though it's my first serious page ever🤦🏼♂️
Thanks a lot for your advice!
I recently started playing around with the CMS (whenever I have some free time to do so).
I am going to set up a multi-tenant site and I want the sites to have their own layouts. I can't really find anything about it in the documentation. The closest, I guess, is to have different site types and include different _Layout/Partials depending on the options therein?
Currently I have just set up a simple switch-case for the predefined hostnames in the _ViewStart, including different _Layout files from there. But I was just wondering if there was an intended way.
Piranha.Imagesharpand add it to your
@stanbdos_twitter We're working on updating the documentation as we speak. The templates has been redesigned from scratch for
8.3 and we've consolidated the web & blog template into a single template. This means that in
8.3 you either use
dotnet new piranha.mvc for a web application based on MVC, or
dotnet new piranha.razor for a web application based on Razor Pages
You can also write
dotnet new piranha.mvc -h to see the different options for creating a template. For example you can now setup a mvc project for
MySql by typing:
dotnet new piranha.mvc -d MySql
8.3.1as the include-files for
scssstyles was missing from the web templates. Make sure you update to this version if you want to be able to build and work with the styles in the templates.