by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 03 22:24
    mmikirtumov commented #1093
  • Jun 03 17:09
    i-love-code commented #1219
  • Jun 03 11:23
    tidyui edited #744
  • Jun 02 13:07
    tidyui closed #744
  • Jun 02 13:05
    tidyui assigned #744
  • Jun 02 13:04
    tidyui milestoned #744
  • Jun 02 11:20
    tidyui commented #1219
  • Jun 02 10:36
    filipjansson commented #1219
  • Jun 02 08:56
    biapar commented #1215
  • Jun 02 08:54
    biapar commented #1215
  • Jun 02 08:49
    tidyui commented #1215
  • Jun 02 08:35
    tidyui commented #1219
  • Jun 02 08:24
    biapar commented #1215
  • Jun 02 07:17
    tidyui commented #1219
  • Jun 02 07:15
    tidyui commented #1219
  • Jun 02 06:45
    tidyui commented #1219
  • Jun 02 06:45
    tidyui commented #1219
  • Jun 01 23:31
    i-love-code commented #1219
  • Jun 01 23:31
    i-love-code commented #1219
  • Jun 01 23:04
    eric-wilson commented #1219
Håkan Edling
@tidyui
@Netclick19 you click where you want to add it. You should have a dropdown at the top where you can choose site if you have multiple sites available
1 reply
Gerrit Aulmann
@Maxoper

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

Gerrit Aulmann
@Maxoper
Of course... as always with programming and asking questions. 20min later I figured it out 😄
https://puu.sh/FRu5e/794fac2f88.png
Gerrit Aulmann
@Maxoper
I just had to write .Value on the end of the cast 🤦🏼‍♂️
https://puu.sh/FRuXL/966ebb1505.png
Netclick19
@Netclick19
It's a bug that the image previews doesn't work? In the last version worked well.
Håkan Edling
@tidyui
Which version @Netclick19 ?
Håkan Edling
@tidyui
See the above screen recording @Netclick19 on copying pages
Gerrit Aulmann
@Maxoper

I've got another question which is rather conceptual.
I'm trying to make a seminars filtering page like so:
https://puu.sh/FRwEO/22684bf05c.png

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.
https://puu.sh/FRwMz/8977e03fff.png

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 🙈

Håkan Edling
@tidyui
@Maxoper The "best" solution would probably be to create a custom CalendarField that 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 Seminar (IList<DateField>) where the user can add one or more dates for the seminar.
Håkan Edling
@tidyui
@Maxoper In terms of building a custom field, this seems to be an available Vue.js component that fulfills your needs. https://vuejsexamples.com/a-simple-and-sweet-vue-js-calendar/
Gerrit Aulmann
@Maxoper

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!

Netclick19
@Netclick19
I'm using the version 8.2.
With api media service, there is a way to get a document by filename?
Thank you for the video! I can't do that because I haven't any page in the new site. Now I've create a blank page and then I can copy between sites. Thank you very much!
Håkan Edling
@tidyui
@Maxoper I think the best solution would be to create an ArchivePage for the AcademyPage, then make the seminars as posts. Then you get automatic filtering on categories and tags for your seminars
Gerrit Aulmann
@Maxoper
ohhh, haven't thought about that feature at all 😮 Basically deleted all blog stuff.
Nathan Thompson
@nate28146
Hi everyone. I was wondering someone could answer a question or knows of a workaround for an issue I'm having. Is it possible to add <script> and <style> tags using TinyMCE Editor? Be default, TinyMCE strips these out. I am loading TinyMCE from the editorconfig.json file and adding "extended_valid_elements" do not appear to be working. Thanks!
Håkan Edling
@tidyui
@nate28146 PiranhaCMS/piranha.core#1154 This is included in 8.3 which be released any day now
Gerrit Aulmann
@Maxoper
Wow and I can easily add via List Region specific stuff to the BlogPost.cs
This is almost too easy... Many thanks! 😄
Nathan Thompson
@nate28146
@tidyui , Nice!, Thanks!
Philip Jensen
@iensenfirippu

Hi guys,
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.

Netclick19
@Netclick19
image.png
Hi, i'm using piranha 8.2. It's my problem that image preview doesn't work?
In page the images are displayed without any problem.
Håkan Edling
@tidyui
@Netclick19 I think @psandgren had the same issue after upgrading the external ImageSharp component to RC. Maybe you’ve done the same?
melaniar
@melaniar
Hi all..I wonder is it possible to hide a page from appearing in "menus"? In the page setting there's option to hide it from the sitemap -- but turn it on doesn't hide it from appearing on the menus.
Thanks
Håkan Edling
@tidyui
That’s most likely just a miss in the template @melaniar When rendering the menu you have a property IsHidden that you can use for this!
melaniar
@melaniar
Thanks @tidyui I'll take a look of it
Hi @nate28146 ...I don't think you could add <script> or <style> in the tiny mce editor -- what I did was creating JS block and CSS block that I can add to a page whenever I need it
jensbrak
@jensbrak
Nice work with the 8.3 version! Looking forward to try it out (have been way to occupied with other stuff to continue my journey into this awesome project, sadly.)
Netclick19
@Netclick19
image.png
Hi, with the version 8.3 after the page title I've found an image place and a textfield. How can I remove this?
Netclick19
@Netclick19
image.png
Hi Hakan, for the preview problem I don't have installed ImageSharp.
Stan
@stanbdos_twitter
Hello, can you point to me in the docs where it demonstrates how to setup Piranha to use mysql or sql server?
Netclick19
@Netclick19
image.png
This is the output error when the preview is trying to display
@stanbdos_twitter Hi Stan, you have to setup the service like this piece of code.
// Service setup
services.AddPiranha(options =>
{........
options.UseIdentityWithSeed<Piranha.AspNetCore.Identity.MySQL.IdentityMySQLDb>(db => db.UseMySql(Configuration.GetConnectionString("piranhamysql")));
options.UseEF<MySqlDb>(db => db.UseMySql(Configuration.GetConnectionString("piranhamysql")));
});
Stan
@stanbdos_twitter
Thank you much @Netclick19 !
Gerrit Aulmann
@Maxoper
I fear we would've to create our own pagebase.cs, page vue.js scripts and such to remove the image + excerpt from pages.
Stan
@stanbdos_twitter
Hi, should I try to use the piranha.web as a starting point? I noticed I was getting an error when running "dotnet new piranha.web". I did run the "dotnet new -i Piranha.Templates" earlier.
Håkan Edling
@tidyui
@jensbrak Thank! We really think this version is awesome as well 😀 We've tried to focus on getting as much smaller requested features in as possible!
@Netclick19 PrimaryImage can be disabled on the PageType! Take a look at https://piranhacms.org/docs/content/pages
@Regarding the image preview error. You probably need a package that can resize images for the thumbnail to show up. Install the packages Piranha.Imagesharp and add it to your Startup.cs
@Maxoper No need. Just specify in your Page Types that you want to disable it and it won't show up in the manager. The same goes for posts.
Håkan Edling
@tidyui

@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

Håkan Edling
@tidyui
Updated docs for the new templates are now available at https://piranhacms.org/docs/basics/project-templates. We've also released an update for the templates 8.3.1 as the include-files for scss styles 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.
Gerrit Aulmann
@Maxoper
Thanks! You're a beast answering so many questions so detailed... Since years....