GetKeywords
array CAdvBanner::GetKeywords( varchar(255) TYPE_SID="", varchar(255) LOGIC="", char(1) EXACT_MATCH="" );
The method returns all or part of an array containing keyword specified for the given page with the functions CAdvBanner::SetDesiredKeywords and CAdvBanner::SetRequiredKeywords. Non-static method.
Method parameters
Parameter | Description |
---|---|
TYPE_SID | Symbolic identifier of the advertisement type. If specified, the method returns all keywords assigned to this type. Optional parameter. |
LOGIC | Specifies which keywords of the banner to delete. Possible values:
If the type of advertisement is specified as well as this parameter, the method will delete the keywords array, specified for corresponding ad type and operating by the "ATTENDANCE DESIRED" or "ATTENDANCE REQUIRED". Optional parameter. |
EXACT_MATCH | Search type ID (exact or fuzzy word match). Possible values: "Y" or "N". If type of advertisement, search logic ID and this parameter are specified, then this method returns array of keywords, specified for a corresponding type, while operating according to corresponding logic. The array keywords will be specified for fuzzy (EXACT_MATCH=N) or exact (EXACT_MATCH=Y) match. Optional parameter. |
Example
Array ( [LEFT] => Array ( [REQUIRED] => Array ( [Y] => Array ( [0] => GeForce [1] => Radeon [2] => AverTV [3] => Sony ) ) ) [TOP] => Array ( [DESIRED] => Array ( [N] => Array ( [0] => BMW [1] => top soft [2] => XP ) ) ) )
The above array prescribe the following logics of the banner selection.
- Banners of the type "LEFT" exactly matching the keywords "GeForce", "Radeon", "AverTV", "Sony" will have the highest priority of the display.
- Banners of the type "TOP" that have at least one of the words of the list "BMW", "top soft", "XP" or part of a word will have the highest priority of the display..
If a page contains keywords, the following two scenarios are possible.
- No banners matching the keyword list are found. In this case, banners with an empty list of keywords are displayed according to their priority.
- More than one matching banners are found. In this case, a banner is selected that has the highest priority with respect to the priority of its contract.
Please remember that a full list of banner keywords is comprised by both banner keywords and keywords of a contract to which the banner is attached.
© «Bitrix24», 2001-2024