marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
page-specific include support?

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « page-specific include support? »
Welcome, Guest. Please Login or Register.
12/18/17 at 01:02:42
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   page-specific include support?
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: page-specific include support?  (Read 829 times)
lgbtees
Silver Dragon
***

Posts: 37




   

WWW
page-specific include support?
« on: 10/21/06 at 10:40:56 »
Reply with quote Modify message

I was just looking at the update history in the latest (10/21/06) update to cpshop, and it mentions "page-specific include support".  Could someone elaborate on what this means to cpshop users?

Thanks,
Adam  
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: page-specific include support?
« Reply #1 on: 10/21/06 at 23:57:14 »
Reply with quote Modify message

It's refering to a new feature called "hooks."  You can learn about hooks here:
http://www.marty.net/go2/site/view/marty/149
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
melissa
White Dragon
**

Posts: 15




   

Re: page-specific include support?
« Reply #2 on: 10/22/06 at 08:18:48 »
Reply with quote Modify message

Wow. Just read that page. Something new to play around with

Thanks Marty!
Logged
lgbtees
Silver Dragon
***

Posts: 37




   

WWW
Re: page-specific include support?
« Reply #3 on: 10/22/06 at 10:48:38 »
Reply with quote Modify message

I see that for hooks for a specific section, "pages within a section (subsections and product pages) will also qualify".  I'm actually looking for some way to replace the Section Description field functionality with something more centrally manageable, so I can create and maintain a non-standard layout (including a close-up picture of the design) that appears at the top of a section without having to go into that field on each affected page -- but I only want it to appear at the top of the type of section page that shows the design on various products, NOT on the sub-pages.  Is there any way to accomplish this with hooks?
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: page-specific include support?
« Reply #4 on: 10/22/06 at 12:54:19 »
Reply with quote Modify message

You could create hooks for each particular section, and then create an all-product-pages hook, which would just be an empty file.  That would work for all cases except for sections with subsections (though I suppose you could create empty hooks for them too, if you really wanted).
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
melissa
White Dragon
**

Posts: 15




   

Re: page-specific include support?
« Reply #5 on: 10/22/06 at 14:17:06 »
Reply with quote Modify message

Ok, here's a "hook" question

I'm setting up my store with multiple cgi files. So let's say I have 3 sections, each with their own cgi files called
http://www.myurl.com/cgi-bin/store/SECTION1.cgi
http://www. myurl.com/cgi-bin/store/SECTION2.cgi
http://www. myurl.com/cgi-bin/store/SECTION3.cgi

Is there a hook I could use so it would recognize the cgi filename?

I'd like to be able to use the same template across SECTION1, SECTION2, and SECTION3, but I'd like to use a hook that would recognize which cgi file was being used. That way if I wanted all pages using the SECTION1.cgi files to have a SECTION1-HEADER, and all SECTION2.cgi files to have a SECTION2-HEADER etc., I could do that by using one template with a hook, instead of creating a separate template for each of those sections.

Anything like that possible? (FWIW, right now I'm trying to do something similar by using javascript to check the current full URL and then having the script insert the appropriate text based on that.)
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: page-specific include support?
« Reply #6 on: 10/23/06 at 02:33:58 »
Reply with quote Modify message

Well, each hook content file is prefixed with the name of the cgi file, so there shouldn't be any problem here at all.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
melissa
White Dragon
**

Posts: 15




   

Re: page-specific include support?
« Reply #7 on: 10/23/06 at 08:23:33 »
Reply with quote Modify message

Oh, right. Good point  

So I could use the "all pages" hook tag in the template, make an "all pages" hook specific to each cgi file I have, and then each should implement the "all hook" that's specific to that cgi file, but not the others. Got it! Thanks!
Logged
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.