I have a django app with a form.
I'd like to make the form available in a django-cms page. How can I add it to a page context (specific page not every page).
Thanks in advance.
Make it a plugin, register the plugin and use its render method.
See the docs.
Related
I'm using the Genesis framework for WordPress and the Business Pro theme.
I want to customise the contact page and if you view the URL below, you can see the Email and Telephone sections that I want to create next to the form.
My question is should I create custom page template or use functions.php to target the contact page using a conditional. I guess I'm trying to find out best practise or if one method is better than the other in this case.
It does not matter how you create a contact form and add it to the page.
You can use a contact form in a page template. It is easier to manage than managing one function in functions.php file having a lot of functions in it.
Another option - is if you use "Genesis framework", use it further.
Otherwise, the part of the site with the framework and other through the code via ftp...
Make a page with this framework, there create what you need.
It will be easier to maintaining a site in the future. Especially if you make a website for a client who is unfamiliar with development.
You could use the Genesis Simple sidebars plugin to create a custom sidebar which only displays on the contact page and populate that widget area with your email and telephone details.
No need for a template but if you want to, create a file named contact.php in your child theme folder and add the following code to the file :
<?php
// Template Name: Contact
genesis();
You can then select the Template named Contact from the Page Attributes box on the Edit Page screen,
The company I am working for has a sitefinity. They want me to create custom pages from scratch for them. I have never used sitefinity, so upon research It appears that I want to create a template via .master. Then once built, I would add to my CMS and access it for use.
Is there a way to make these .master templates other than ASP.NET? ( which I have no experience with)
Essentially all am am wanting to do is create a custom page out of html,css, and jquery and then make a 'template' out of it.
You dont have to use a .master page to create a template in Sitefinity. It's nice to have that level of control but it's not necessary at all. Just go to Design > Page Templates in the Sitefinity backend section /Sitefinity
There are several built in templates you can edit from that page. You can use one of those templates, create a new template from scratch, or create a template based on any one of the templates you see there.
Once you pick a template, you can edit the Layout to add columns and global content or custom CSS.
Not really, if you want control over the markup then you'll have to use a .master page but the good news is that it really is just mostly html and css / js references. Sitefinity has a sample template here but you may want to look at their Visual Studio plugin called Thunder to register a template. It will add in a default master page as well as the default folder structure for the theme, video on that here.
I'm making a wordpress site which looks like and behaves less like a blog and more like a classic web site. I need to make plenty of custom forms and by now I have three equally bad solutions to this.
One would be to create each form as a theme template file. Those pages would submit data to themselves and all would be great, except the fact that I don't really like my plugin and theme to be so hardly connected. I think that theme should be for design only, which means header, footer, etc... and that plugin should handle all the other work.
Second solution is to make some controller.php file somewhere in my plugin folder and then all requests should be directed to this controller which would control what page should be displayed and how. And each page should be made with the use of WP short codes located inside my plugin folder. Problem with this approach is that I have problems transfer POST parameters, after I submit a form. I would submit a form to my controller which would then redirect it to a page with all POST parameters lost.
Third solution would be to target actual pages which display content with the use of WP shortcodes, and when user successfully submits the form shortcode would instead of the custom form, return some Thank you message. Problem here lies in fact that if you hit refresh while Thank You message is displayed browser would submit the form once again. And again and again, every time you'd press refresh.
Simple question. How would you do it?
Would it be the first way? I see many people doing just that, hardcoding their custom forms inside template files, even though it may be not the cleanest solution. Hmm... Still, I would like to separate my forms and logic away from my theme.
Greets
There are a couple of good form solutions as existing plugins. The two that come to mind immediately are Gravity Forms, which you must purchase:
http://www.gravityforms.com/
or Formidable Forms, which has a free basic version and a paid advanced version:
http://wordpress.org/extend/plugins/formidable/
I would definitely suggest using a plugin. It's best to keep design and functionality separate when possible. Both of these plugins are pretty simple to use. I know formidable uses shortcodes, but I'm not sure about Gravity Forms
I'm developing a WordPress theme and I need to have a custom URL for some kind of content.
For example, I need to have a page to show some article details. Now, i've created a page template called "Article", and so i've to create a new page and give it the page template "Article"
(I get the url http://mydomain.com/article?id=123)
It works fine, but now i'm having dozens of this pages, and it's a mess to create them all on every installation of this theme, so i want to do it in my theme code.
I saw something near that on BuddyPress, where you can use /member/ and it redirects to a member page. I just wanna know how to do so.
Thanks!
If you are running wordpress 3.0 I would recommend making a custom post type for your articles. That would allow you to control the URL in the way that you want and also allow you to use more sophisticated full text urls if you wanted to.
Here are some links to some tutorials about how to make a custom post type to get you started:
http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0
http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/
The second one has an example file that you can download and edit to help you get started.
Cheers,
Paul
I'm a drupal newbie...
I created my blog post listing page with View. Everything is great...
but the post detail page is not like as I need. So I wanted to create that page as well with View Module, so I can control all content, etc... but how can I create that page? url changes according to post title. somehow I need to define a dynamic Path at view module page.
appreciate helps!!! Thanks a lot!
You aren't going to want to use Views for that. You should look into creating template pages for whatever theme you are using so that you can customize the look. Here's a Drupal handbook page on blog pages specifically:
http://drupal.org/node/44699
Here's a book that covers front end theming for Drupal in-depth:
http://frontenddrupal.com/