Jump to content

include data into index.tpl


Guest robj

Recommended Posts

Guest robj

I'm building a mod for a customer who wants to change (weekly) the home page to redirect to a specific product. I think I'm able to grab the URL via the admin section then redirect to the specified URL, but I'm not sure how to include this code into the index.php or index.tpl.

I created a module in the affiliates section of the admin to grab the data, and am processing the function with the index.inc.php file. Can someone help me figure this out? After programming for 8 hours, I might just be brain dead.

rob

Link to comment
Share on other sites

What you should do is insert a new row into your config table in the datbase named Redirection_Url then build a function in functions.inc.php to retrieve that url. From there you will want to edit index.php to redirect to that page using the header() function And finally in the admin panel make a form that will edit your redirection link. You shouldnt even have to work in index.tpl

Link to comment
Share on other sites

Thx for the responses. I may have needed to provide a bit more detail about my problem, but cubecartfoums.org seems like it might be a better place to answer my questions.

rob

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...