CP Content-Part



The module appears as a new Content-Part: plug-in: Catalogue



already saved Content-Parts give you a preview with CP-Title, CP-Subtitle, selected catalogs

Catalogs


In the Content-Part you decide which catalogs with all their active entries will appear in frontend (within the actual article).
You can choose one or more catalogs.
This selection can be used as filter in frontend too, see below.
:!: Without selection here the frontend will stay blank

Template and CSS


Give your frontend catalog a certain template and css definitions.
The folders to add more template- and css-files are indicated below the drop downs

Template changer

We added a basic template changer - you can show the same content with different templates in frontend!

to use it:
if your template chosen is 'sample.tmpl' then you can add templates with the same name but a leading number e.g. '1sample.tmpl' and then add '&ctgtmpl=1' to the link in frontend - this will render the special template rather than the default one.
To link back to the default template use: '&ctgtmpl=0'

In the templates itself use: {BACKLINK}&ctgtmpl=[your number]

The number 2 template has another speciality:
in this template you can overwrite the default settings from the Content-Part for the listing images and the global googlemap

<!--TMPL_SETTINGS_START//-->
; overwrite image width for listing only for this template
ctg_imgwidth = 168
; overwrite image height for listing only for this template
ctg_imgheight = 168
; crop listing images? 0/1
ctg_imgcrop = 1
; crop listing images? 0/1
ctg_imgrand = 0
; global map? 0/1
ctg_usegooglemaps = 0
<!--TMPL_SETTINGS_END//-->

or all these settings:

this gives you quite a bit of flexibility to play around with the content in frontend

see how it works in the example

Filters


The heart of the module are it's filters.
You can add up to 5 filters in total.


{FILTER_0}

  • always the catalog-selection
  • can be rendered as ul, dropdown, div or div+slider
  • can have an individual standard expression (defaults to 'default' when empty)
  • always sortes as the catalogs (alhpabetically ASC)


Examle


{FILTER_1}

  • individual tags (enter a letter to choose from existing tags), comma-seperated, use only tags added in the module!
  • can be rendered as ul, dropdown, div or div+slider
  • can have an individual standard expression (defaults to 'default' when empty)
  • sort individually or use the ASC / DESC function


Examle


{FILTER_2}, {FILTER_3}, {FILTER_4}

  • individual tags (enter a letter to choose from existing tags), comma-seperated, use only tags added in the module!
  • can be rendered only as dropdown
  • can have an individual standard expression (defaults to 'default' when empty)
  • sort individually or use the ASC / DESC function

more examples will come soon


:!: FILTER_0 and FILTER_1 when rendered as dropdown and FILTER_2 to FILTER_4 need to be placed within a form-tag with method=“POST” and action=”{BACKLINK}” and name=“ctgfilterform” in the template.

<form method='post' name='ctgfilterform' action='{BACKLINK}' class='ctg_filter_form'> ... </form>


ul, div and div+slider renderings can be placed everywhere in the template

Examples for:



Other RT's for filters:
:!: New V.1.0.1

[FILTERX_TAGS]{FILTERX_TAGS}[/FILTERX_TAGS]
This shows all tags for an entry that are added to the entry and are part of the filter X

[FILTER_STRING]{FILTER_STRING}[/FILTER_STRING]
Shows a string with all selected values from all filters seperated with ' - ' starting with filter 1 up to filter 4

Search


there are two search engines for catalogue content:
the phpwcms search engine will find your catalogue entries and list them with links to the detailview of the entry.
see here for more

but the catalogue itself has a search engine as well that works together with filters and menues from the catalogue.
all you need is place the following line in your template to generate a search field:

<input type="text" name="ctgsearch" value="{SEARCHTEXT}" />

optional you can add a button to execute the search

<input type="image" name="gofilter" src="picture/layout/search.gif" class="filter_button" />


the important part is to place these lines within the form tag where you may have other filters, see above.

Settings for listing view


Here you decide how the thumbnail images should appear in the LISTING
There is an option to tell the script to always (each page load) take a randomly selected image when there is more than one

activate Google Maps will render the global map with all points (when the point allows google map) according to the filters and menus
in the template add [MAP]{MAP}[/MAP] where you want the map to appear
it renders as: <div id=“map_canvas” class=“mapcontainer”>This should be a map.</div>
and the Google Maps API loads to get the map functions from Google
the map center and zoomvalue is detected automatically according to the visible markers

Note: since we use Google Maps API v3 here you may have a look at https://developers.google.com/maps/terms because Google limits the use of the map in some cases!




see here for more about that

Settings for detail view


Here you decide how the thumbnail images should appear in the DETAIL VIEW
There is an option to tell the script to randomize the order of the images on each page load

because in the Google Map, if set, only one marker will appear in the detail view, you have to set the initial zoom value here, go with 14 to begin.

RSS Feed


The catalog can be provided as RSS Feed, just activate it, add a title and description to the Feed, and save/update the Content-Part
this will generate/update the xml file (path and name indicated after first saving)

when you want to place a link on your site for the feed use {RSS} in the template for the URL to the feed-file
<a href=”{RSS}” title=“RSS Feed”>Linktext</>

Note:

  • the RSS Feed uses always the first image for each item, even if you randomized it on the website
  • the feed item title comes from the entry title
  • the feed item description is: subtitle + teasertext + fulltext (all html-tags are deleted! the content should pass though)


once activated the feed appears in the 'module' tab in the module section

here you can preview your feed (click on the RSS icon)
you can update the feed here without to open the Content-Part
and you can delete the RSS Feed file from the server

:!: this was a whole lot of work! So, when you use this feature consider to press the donation button on this site!

3rd-party-modules/catalogue/catalogue-docu/catalogue-docu-cp.txt · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0