Gossamer Forum
Quote Reply
Pagebuilder question
Hi,

I want to build some static XML pages in one directory but only for selective categories. I have the feed up and running in Dynamic mode - all I need is to make Pagebuilder make 10 files in one directory (one file for each category I choose..)

I have set build Directory to /XML_Feeds and the Build Filename to <%Name%>.xml

Questions is - how do I only make is build the category numbers I want..?!?

Cheers
Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Pagebuilder question In reply to
You need to use a build condition.

The easiest way is if you have a custom field in your category table that has a special value for the categories that you want to build a page for. Assuming that the special field is called 'build_xml' and that it is set to '1' for those categories that you want to build, the condition can be something like

build_xml = 1

If you don't have a special field, you might be lucky with something like

ID IN \('1','3','5')

but I can't guarantee that this works.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pagebuilder question In reply to
ID IN \(1,2,3)

...will create three scalar references. Is that what you intended?
Quote Reply
Re: [yogi] Pagebuilder question In reply to
Hi Yogi,

I have made the custom field in the category - but get the following error when I build:

Code:
xml_feed (Unable to build link page}.
Filename should contain one of the following tags: and/or
Directory should contain one of the following tags: ,

As Directory I use: xml_feed
as Filename I use: <%name%>.xml

Parent Page: Root
Page type: Category
Page condition: build_xml = Yes

What is wrong?

Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Mar 30, 2003, 6:23 AM
Quote Reply
Re: [yogi] Pagebuilder question In reply to
Ok I got it to build the pages by setting Filename to: <%CategoryID%>.xml as per the manual Blush

But - the problem is I wanted to have the name of the file (or category) to be the name of the file - ie. category_name.xml

Can I use anything else than <%CategoryID%> and <%Full_name%>? (which returns the number of the category as I use foreign chrs mode)


Cheers
Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Pagebuilder question In reply to
Have a look at the file 'PageBuilder.pm' in admin/Plugins.

Near the top, the variable $PAGEBUILDER_FIELDS is initialized. You can add your own fields to it (should be self-explanatory), e.g. 'Name' for the category name. Make sure, though, that all your category names make sense as filenames.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Pagebuilder question In reply to
Yogi, is it possible to condition PageBuilder to Build pages only if they are new? something like the Links SQL build -update option?
Quote Reply
Re: [yogi] Pagebuilder question In reply to
thanks Ivan - works :-)

Klaus

http://www.ameinfo.com