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

"PageExtension" module views/partials no longer appearing in AsgardCMS v3. #546

Closed
pavsid opened this issue May 31, 2018 · 18 comments
Closed

Comments

@pavsid
Copy link

pavsid commented May 31, 2018

I suspect this is to do with the new way the Page Module uses Vue.js, but without any documentation or guides we are totally stuck!

@nWidart - Any chance of a quick tutorial or at least pointing us in the right direction please? I know others are wondering how to get this working too.

Many thanks.

@TheDutchDev
Copy link

Yeap, I'm stuck on the same issue.
https://www.youtube.com/watch?v=HpzYIWOdzv8 -> this tutorial doesn't seem to work anymore, I've followed every step carefully and yet when I'm at the point where the fields should show up in the page edit in the backend, there's nothing there.

@pavsid
Copy link
Author

pavsid commented Jun 2, 2018

@sampniels Yeah that video is for version 2, can't find anything for version 3. V3 uses Vue templates and have no idea how to go about it

@TheDutchDev
Copy link

Yeap, kinda sucks cause in v3 documentation https://asgardcms.com/docs/v3/workshop-module/module-scaffold it refers to a quickcast video but the video doesn't exist anymore..

@nWidart
Copy link
Member

nWidart commented Jun 4, 2018

Hello,

You're correct, this feature has been removed in version 3 because of vuejs.

The way to overwrite/extend the page module now is to remove the page module as composer dependency and commit it.

You're right the documentation should be updated.

@pavsid
Copy link
Author

pavsid commented Jun 4, 2018

@nWidart thanks for confirming.

@TheDutchDev
Copy link

@nWidart "The way to overwrite/extend the page module now is to remove the page module as composer dependency and commit it."

I'm not entirely sure what you mean by that, I've almost 0 experience with working with this CMS, got alot of experience working with Laravel though so if you could give me some global steps of what to do in order to extend the page, you'd help me out alot :)

@nWidart
Copy link
Member

nWidart commented Jun 4, 2018

Sure, though this has nothing to do with the cms or laravel but basic composer and git usage.

  • start by making sure the page module is committed
  • remove the page module from the main composer.json file / or run composer remove on the page module
  • page module will be removed but you can add it back with git

or a simpler approach, copy the page module folder before running the composer remove command and put it back afterwards.

@pavsid
Copy link
Author

pavsid commented Jun 8, 2018

@nWidart - can we have some more guidance please? I have tried editing the Page module partials, and the .vue files in \Modules\Page\Assets\js\components, and then run npm run prod on the Adminlte theme, but still no changes are appearing. I have cleared cache & views. Thanks

@nWidart
Copy link
Member

nWidart commented Jun 8, 2018

run npm run dev/prod in the root of the project, not adminlte theme

@pavsid
Copy link
Author

pavsid commented Jun 8, 2018

Ah, yes that's worked, thanks. Just one more question - is there any point to the views in \Modules\Page\Resources\views? Seems to me that only the Vue files are used. I'm completely new to Vue so maybe misunderstanding how it works.

@nWidart
Copy link
Member

nWidart commented Jun 8, 2018

Yes, for now they're there so when you refresh a page route, it works.

@pavsid
Copy link
Author

pavsid commented Jun 8, 2018

When would we refresh a page route? I'm wondering if I need to bother changing those files also. For now I'm only adding some page attributes/extensions to the page module.

@nWidart
Copy link
Member

nWidart commented Jun 8, 2018

When you press cmd+r / f5 on a page route.

@pavsid
Copy link
Author

pavsid commented Jun 8, 2018

@nWidart - appreciate the work you've done, but this is now way too complex to customise, especially without documentation. Perhaps a feature like page attributes should be bundled out of the box, as I'm guessing the majority of users will need that functionality.

@nWidart
Copy link
Member

nWidart commented Jun 8, 2018

I see. Well it might look complex, it may be because you're not used to vuejs. Once you get the hang of it it's not as complex as it may seem.

@pavsid
Copy link
Author

pavsid commented Jun 8, 2018

Yeh that probably has a lot to do with it. However, I have got my custom fields appearing so the Vue stuff is out the way mostly. But then I hit a few other issues - $pageId is no longer present on the Page events, also I have no idea how to get the data into the Vue template, as it seems the Composer needs refactoring also i.e. PageAttributesComposer.

@nWidart
Copy link
Member

nWidart commented Oct 7, 2018

I'll close this as there hasn't been a reply in a while, feel free to comment if needed.

@nWidart nWidart closed this as completed Oct 7, 2018
@jmazurpl
Copy link

@nWidart if old views still exists and are working is there any way to disable the vue version and use the “old one”? I’m experiencing some issues with ckeditor not loading its content and I think it might be caused by vue.

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

No branches or pull requests

4 participants