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
Call 'Static Page' to 'CMS Page' #2472
Comments
What you need to do is grab the content in html form and put it into a content block. then call that content block with {% content 'file_name' %} simplest way i can think of |
so you mean to say, create one static page and put some code there .. and then go to cms page and put this code on that particular page like this {% content 'file_name' %} ? |
Yes. but make sure its a content file in .htm format |
theres a section called content in the CMS backend. you want to drop the desired HTML code there |
Ok ... i m using this plugin for your information https://octobercms.com/index.php/plugin/rainlab-pages and i have created one page called as "mypage" and then i went to CMS ==> page section and then created a new page here called as "cmspage" (cmspage.htm) and i have put this code
what am i doing wrong here ? |
It's because you're using a page instead of a content file. you want to use a Content file under the CMS backend. CMS => Content |
Should be on the left side |
you want to create a content file under there with the desired HTML |
but my question is to get the content from static page which plugin provides to one of my cms page as i do not want my clients to go to CMS section as it will be tough for them to see codes over there .. are you with me ? |
and yea one more thing .. i have one contact form plugin , this one https://octobercms.com/plugin/devinx-contactus and even if i create one content page in CMS section called as "contactformnew.htm" and put the component's code |
so actually if you understand it properly .. my scenario is actually to make my contact form https://octobercms.com/plugin/devinx-contactus work in one of my static pages which i m creating from this plugin https://octobercms.com/index.php/plugin/rainlab-pages whether it will be getting code from CMS page to my static page which i m creating from this plugin or from partial or snippet to one of my static page of this plugin.. Additionally, this plugin already has this code in Plugins.php page
but when i go to static pages section and click on "Snippets" on left, i can not see any partial or snippet of this plugin .. so i m confused what should i do to achieve this thing .. |
Well in the pages section, there is a section for content. It comes with a WYSIWYG editor. completely hides the code. But other than that, IDK. I just started using it a few days ago and thats the best way i can think of for client management with a contact form |
yes i can see this Content link underneath Pages section .. so what should i do in this .. i want to make my dynamic contact form to work ... |
The Content page under the CMS page is linked to the one in the Pages section. When you add a content block with that form, it becomes a reusable chunk of html. So you can put that content block wherever you want your form to render, and still be able to adjust the form in the backend whilst it changing every where else you put that content block. |
ok .. i have created one content page contentstaticpage.htm and put this code into it i am unable to see any form over there .. |
so if you got me, i simply want my contact form to work in my static pages .. |
WAIT! i'm sorry, so you want to add a Partial instead of a content block. then call the partial with {% partial 'file_name' %} I'm so sorry. i get those mixed up. |
ok so what should i code to make my contact form working in partial ? |
Put |
ok let me tell you what i have done here .. i have created a partial called as "partial-contact-form" and simply put this code then i went to static pages and created a page called as newpage and dragged and dropped my newly created partial over there .. Now i am able to see this form but when i click on it i am getting this error saying
|
so it means now my plugin stopped working which was working before if i put the same code |
do you have Or maybe did you copy the full code over? That's all I can think of |
ok let me put both these codes in my static page and then my layout page which i m selecting while creating this static page .. |
It only needs to be in one or the other. before the ending |
ok .. i have put bothe the codes still i m having the same error saying
Additionally, even i found a code of
and simply paste it in my partial page's code tab .. still having the same error saying
|
Hmmmm. I'm at a loss here. Perhaps someone else could help? |
can you refer this issue one of the other fellas who knows may be how to deal with this scenario .. i mean i guess someone surely have achieved this thing before.. m not the first one for sure .. |
I would if i could but sadly no. The devs will most likely see this. so I'd say just wait a bit and see what happens |
hmmm .. i must say .. thanks for your great inputs ... appreciated .. Thanks |
Ok guys, eventually i have come up with the solution .. not the way which i wanted but somehow i am able to achieve or manage it you can say .. So here is what i have done to make my CMS partial with having contact form working in one of my static pages .. I went to the layout which i want to select in my static page .. i have a default layout so i just opened a file of default layout and pasted this code
Then i simply go to CMS section and created one partial contact-form.htm and dragged and dropped my component into this partial ... you can always update the contact form in this partial .. which i did in my case. Then i went to Static Page and created one static page there called as Contact us. There i have put some content which was needed from myside for this page and then simply dragged and dropped this partial into this and its working .. Contact form is working now .. Thank you guys for your support .. |
I have installed Static Pages plugin https://octobercms.com/index.php/plugin/rainlab-pages in one of my OctoberCMS project.
Is there any way i can call one of static page to a CMS page ?
I am asking this because i have already installed one plugin called Flexi Contact https://octobercms.com/index.php/plugin/laminsanneh-flexicontact and i have modified its html form using component in one of my CMS page .. but i want the other content in the page itself from Static page .. so client can only modify from that content from there and i will show up here in my CMS page by calling that static page ..
i have tried to go viseversa by using
registerPageSnippets()
method in plugin which will help me to use this as a snippet and then call it into static pages, but its shows old html which is providing by plugin itself .. hence i m unable to use my updated html form there ..Can anybody give me a clue what should i do in this scenario ?
Thanks
The text was updated successfully, but these errors were encountered: