Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modx Revolution 2.3 chunk properties not showing up #38

Open
mooror opened this issue Jun 26, 2015 · 4 comments
Open

Modx Revolution 2.3 chunk properties not showing up #38

mooror opened this issue Jun 26, 2015 · 4 comments
Labels

Comments

@mooror
Copy link

mooror commented Jun 26, 2015

Hey there, I was trying out your awesome repoman extra when I discovered that my chunks load in just fine but my @param statements don't seem to be doing anything or at least nothing I can see in the properties panel. Here is my doc block code:

<!--
@name slickSlide
@description This is a chunk for slides

@param textfield $title The title of the slide. default=Slide
@param textfield $content This is the content of the slide. default=Slide Content
@param textfield $image This is the slide image path. default=/assets/slider/dist/images/slide-1.png
@param textfield $lazyload Whether or not the slide uses lazyloading. default=true
@peram textfield $block Special content for slides. default=

--!>

P.S. I also made sure to do a repoman update through the command console and a rebuild through the modx CMP.

Thanks in advance,
Mooror

@fireproofsocks
Copy link
Member

The syntax here is tricky, so that's something to keep an eye on. Take a look at this video for an example of working with parameters: https://www.youtube.com/watch?v=Ct4uUI8rJ_M

I think (?) you may need to reformat the input to something like:

@param string $title The title of the slide. [default="Slide"]

...but I'd have to review my unit tests to see which formats are supported...

Did you run repoman update on your code directory? Because the element parameters are separate database records, you have to use a separate command to trigger them to be created/updated. In other words, regular editing of your Chunk/Snippet/Template content is fine without any special repoman commands, but the param bits only get parsed during the install or update operations. See https://github.com/craftsmancoding/repoman/wiki/Tutorial--Element%20Properties

Gah.. I need to clean up the documentation here. It's so disorganized it confused even me. Let me know if running repoman update causes this to be fixed.

@mooror
Copy link
Author

mooror commented Jun 29, 2015

Thank you for the reply fireproofsocks, I tried your suggestions and they didn't work for my chunk properties but they did however work for my snippets. At first I didn't see any success when I noticed that my last param had been typed out wrong (peram) after fixing that and using the repoman update I was able to successfully get the properties to work in my snippet. Now I am trying to find out how to get them to work in my chunks. I will share my solution when I have it.

P.s. Also for anyone else who might come across this post make sure you do [default=" "] {note the space in between} or modx will set your property to false instead of just blank.

@fireproofsocks
Copy link
Member

The empty string as false might be a bug and should be filed as a separate issue. I may not have implemented the parsing of the params on the chunks...

@mooror
Copy link
Author

mooror commented Sep 6, 2015

Hey there again fireproofsocks, I know your probably very busy right now and I totally understand what that's like, so please don't feel like I'm trying to rush you. But I was just wondering if there has been any progress on this issue. If you know how to fix it but just don't have the time, I would gladly do up a pull request with the changes.

Thanks for your amazing project,
Mooror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants