Jump to content

Ttuorial


unidox

Recommended Posts

Is this your own CMS?  I've never done modules before but assuming you have the pages stored in a table somehow each with a unique id, you could create a second table to store module instances for when you create a new module to be used on a page.  Each row in the instance table could have a unique_id, and a  reference to the page you want to include it on...like the id from the pages table and perhaps a path to the script that would run the module.  Then on each page, in the column where the modules would go do a select query to check for modules on that page, using the page id which you must've used somewhere earlier on the page to display your contents.  Then while looping through the results just include the path to the script from the database.  I dunno..something like that would work I think. 

Link to comment
Share on other sites

Yes, it is my own cms...

 

Well, I asked a friend and I was just wondering if this would work...

 

I wrote it up right now, and its 2 in the morning, so if the code is bad, please help.

 

Use a table and in the admin define a number 1 for left, 2 for right

 

$block1 = "Block #1";
$block2 = "Block #2";
$block3 = "Block #3";

If {
$block1 == "1";
print "$block1";

}ifelse{

$block2 == "2";
print "$block2";

}ifelse{

$block3 == "3";
print "$block3";

 

Not sure if I typed that in right. I wonder if that will work

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.