Forums / Developer / standalone files, e.g. search forms
Rinze Cats
Friday 23 April 2004 3:01:53 am
Hiya,
I was wondering what the correct method is for implementing files which don't need an actual class. If I have for instance a page in the same layout as the rest of my site, that shows a search form, or sitemap, or email form ( pages that need no input from the site editor). how can I get the standard pagelayout template call the sitemap functionality?
to clarify: my search page should look the same as an article page. An article page would use an article object and associated template to show the article. My sitemap should just use a template, without the object.
can't be to hard, just looking for the best way to do it. I could, ofcourse, copy the page template and add the sitemap functionality, but this can't be te way to go!
thanx in advance!
Eirik Alfstad Johansen
Friday 23 April 2004 3:17:20 am
Hi Rinze,
Not sure if I understand what you're trying to do? If you need to display the sitemap as a part of your site design, why not just use content/view/sitemap/2 for the desired siteaccess?
Sincerely,
Eirik Johansenhttp://www.netmaking.no/
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Friday 23 April 2004 3:31:59 am
hi and thanx for the quick reply. I guess my problem is best described as follows..
where do I put the template code which I can find in content/view/sitemap/2?
Let's say i create my own sitemap.tpl using this code, what do I assign the template to ?
Friday 23 April 2004 3:44:26 am
A quick 'n' dirty solution would be to create a new object of any class and then make a node-specific override template. Another, approach is to create an extension with a separate view. It depends on your needs.
Friday 23 April 2004 3:55:03 am
is there no standard solution for this. It isn't anything strange what I am trying to do here is it?
let's take a search form for instance. the website should present a search form. There is no class I need to use so a site editor could create a search form instance.
I create a folder named seach form and in this folder I want to 'create' the form, which consists of only template code.
Your quick and dirty sollution occured to me as well. I could create a class with no fields fos instance, and put my code in a template for this class. However, a standard sollution must be at hand. everybody has these funcitonalities in their sites!
Friday 23 April 2004 3:56:42 am
btw, I'm not sure on how to implement the extension sollution you are suggesting, but I can tell you my needs are very basic ;-)
Dominik Pich
Friday 23 April 2004 5:56:15 pm
For many occasions there is only a view... only a template. No contentobject.e.g. for searches, for the basket, for the sitemap.......
Just use that view. modify it to your needs