Hmmm. Sorry I missed your email.
The cause is that snippets get escaped before being inserted into the
page. So they are not available to the search function. It can be
fixed by changing markups.php line 247 to this:
$params = BOLTescape(substr($params, strlen($function)), false);
It is confusing what we should do with snippets. Times to escape,
times they shouldn't be. Yet I hate patching things here and there. Oh
well, this fix will hold us for awhile, I suppose.
Cheers,
Dan
On Wed, Sep 30, 2009 at 8:26 AM, Markus <[email protected]> wrote:
>
> Either I overlook something very obvious or the snippet is not
> processed when put in the search function.
>
> Snippet:
> syspages: header,footer,side,top,bottom
>
> Searches:
> [(search dir=pages exclude=$$syspages)]
> [(search pages=$$syspages)]
>
> The source reveals "$$syspages". If I put $$syspages outside the
> search function, then the replacement works.
>
> Regards, Markus
>
> On Sep 30, 2:05 pm, Markus <[email protected]> wrote:
>> On Sep 30, 2:34 am, The Editor <[email protected]> wrote:
>>
>> > >> You can set in site.config
>>
>> > >> searchExclude:
>> > >> rss*,blog*,template*,site*,code*,action*,login*,top,side,header,bottom
>>
>> > > Could this be additional to the custom excludes you set on a page? If
>> > > so, it would be very useful! It could then be overridden by "include".
>> > > For example "include=top,side,header,bottom".
>>
>> > Actually this is how you set the default excludes... :)
>>
>> Hm, I am not sure if you understood what I said. I'll use an example:
>>
>> 1) I put "searchExclude: top,side,header,bottom" to site.config
>> 2) I add "exclude=the_page" to my search
>> 3) I don't get the_page but I will get top+side+header+bottom
>>
>> If it were additionally added to the search query, it would exclude
>> the_page and top+side+header+bottom.
>>
>>
>>
>>
>>
>> > >> if you want to save you some typing for a default, but then you have
>> > >> to remember to do exclude=something (false?) to avoid the default
>> > >> being used.
>>
>> > >> It's more normal to use it to exclude header, footer, and side or the
>> > >> like.
>>
>> > > What about adding some more types?
>>
>> > > "type=-zones" comes to my mind first.
>>
>> > > And maybe one type matching these five:
>> > > template*,site*,code*,action*,login*
>>
>> > These are excellent ideas, however the first one is not particularly
>> > easy to do. And the second is doable easily enough already by creating
>> > a custom system variable. Actually for that matter, why not just use a
>> > snippet:
>>
>> > type1: type=-header,footer,side,top,bottom
>> > type2: exclude=template*,site*,code*,action*,login*
>>
>> > Then in search function go [(search $$type1 $$type2)]
>>
>> > Of course you could customize whatever ways you want. even doing
>> > something like: $$type1,right,otherzone.
>>
>> > Snippets get processed early on so they can be used for most any kind
>> > of shortcuts you want. That's really the idea behind them. Anything
>> > you find yourself typing over and over, make it into a little snippet.
>>
>> Don't add -zones. First you said it is not straight forward and it
>> would introduce new complexity. Exclude would then not only get pages
>> as arguments but also some harder to identify/classify variables.
>> Forget this idea. :)
>>
>> The snippets solution seems far superior to me. It's good that you
>> think thrice before adding anything to BoltWire (especially if it can
>> be easily done with the default tools). This is probably one of the
>> main reasons why BoltWire is so beautiful.
>>
>> Regards, Markus
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---