Let's say for this example just a blank page (I'll fill it up later) but the user properties are passed on (based on membership) ....
Let's say for this example just a blank page (I'll fill it up later) but the user properties are passed on (based on membership) ....
You could easily enough copy one of the little pages like the faq.php and clear out all of the PageComp stuff. Then copy the member checks from one of the other main pages such as member.php or profile.php.
-Lodlock
How can I change this variableso that is points to a file in a different directory?PHP Code:$_page['name_index'] = 13;
Thanks in advance![]()
you can change the 13 to 333 or something, then copy the default template to the 333 template - and edit that as needed. (its a bit more involved than that with some special pages that dont use the default template and have their own, like the index.php page)
It will allow you to call a different template for the page... but not really a different directory... since the temp directory is coded into different function, to choose the directory based on your selected template.
Now - you could work with that function, and if the called template is 333, have the function get it from someplace else.
But, just changing the value from 13 to 333 is not going to do that.
Sorry if my reply is confusing.
Smoge
ModMySite Administrator
Problems? Questions? Need modifications or other help with your site?
Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.
I am sorry for this embarrasing question
What is $_page['name_index'] = 13;
I am assuming this code calls the index page? What does the 13 signify? And by changing 13 to 333 what exactly would that do?
I took a quick look through my root and template folders. I see page_1.html and plenty others, but I don't see 13, so I must not be understanding this correctly.
Anyone who has a banana can eat it!
From 0 to 6.0 in 3.5
There are no embarrassing questions. Or do I mean there are no stupid questions? (Or maybe that was a stupid question).![]()
I believe "$_page['name_index'] = 13;" would refer to page_13.html. You probably don't have a page_13 because this was a new page that N9neblood was creating. At least that's the way I understand this thread.
$_page['name_index'] = 13; Refers to the corresponding name in the tmpl files eg page_6 = the page template for member.php.
When adding more pages using the template I created a php file in the trunk called mynewpage.php into which I copied faq.php and changed $_page['name_index'] = 13; to $_page['name_index'] = mynewpage; then created a page within the tmpl files called page_mynewpage.html So when you type www.yoursite.com/mynewpage.php you should get the contents of your new page within your design template. Hope I've made sense.
Last edited by N9neBlood; 02-13-2007 at 09:40 AM.
Thank you ! That is clear, and gives me a much needed explanation.
Now, for my next step/question:
I create a folder in the root called "my_dir", and inside this folder there is another folder called 'templates" It is there, in templates that a file named main.html is something that I want to incorporate on a new page in my site.
So, in my root folder, I will create a file: mydir.php, which in essence will be a copy of faqs.php.
In mydir.php I will change $_page['name_index'] = 13 to
$_page['name_index'] = 155
Then, in my tpl files, I will create a file page_155
Now, when ever anyone goes to mysite.com/mydir.php it will have the header and footer of my site, but populate with page_155 ??
Here comes the trick - How do I populate page_155 with root/my_dir/templates/main.html?
copying/paste does not seem to work correctly. Only the static text carries over, but anything that was dynamic variable, does not show.
Originally Posted by N9neBlood
Anyone who has a banana can eat it!
From 0 to 6.0 in 3.5
To possibly clarify what exactly I am trying to do, is install a search directory on my site.
This one, in particular:
http://www.onlinemarketingtoday.com/...nk-management/...
Anyone who has a banana can eat it!
From 0 to 6.0 in 3.5
Do you mean you have copied the contents of main.html and pasted it into page_155.html, and it doesn't work properly? In that case, I would try making the variables global, or 'include' the files containing the variables into your new file mydir.php.Originally Posted by Ringodestarr
But then again I'll try anything, so to save you wasting time you may want to wait till somebody with some knowledge of php can confirm or deny this.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks