Recently Browsing 0 members
No registered users viewing this page.
By Mike Rockett
Docs & Download: rockettpw/markup-sitemap
Modules Directory: MarkupSitemap
MarkupSitemap is essentially an upgrade to MarkupSitemapXML by Pete. It adds multi-language support using the built-in LanguageSupportPageNames. Where multi-language pages are available, they are added to the sitemap by means of an alternate link in that page's <url>. Support for listing images in the sitemap on a page-by-page basis and using a sitemap stylesheet are also added.
Example when using the built-in multi-language profile:
<url> <loc>http://domain.local/about/</loc> <lastmod>2017-08-27T16:16:32+02:00</lastmod> <xhtml:link rel="alternate" hreflang="en" href="http://domain.local/en/about/"/> <xhtml:link rel="alternate" hreflang="de" href="http://domain.local/de/uber/"/> <xhtml:link rel="alternate" hreflang="fi" href="http://domain.local/fi/tietoja/"/> </url> It also uses a locally maintained fork of a sitemap package by Matthew Davies that assists in automating the process.
The doesn't use the same sitemap_ignore field available in MarkupSitemapXML. Rather, it renders sitemap options fields in a Page's Settings tab. One of the fields is for excluding a Page from the sitemap, and another is for excluding its children. You can assign which templates get these config fields in the module's configuration (much like you would with MarkupSEO).
Note that the two exclusion options are mutually exclusive at this point as there may be cases where you don't want to show a parent page, but only its children. Whilst unorthodox, I'm leaving the flexibility there. (The home page cannot be excluded from the sitemap, so the applicable exclusion fields won't be available there.)
Sitemap also allows you to include images for each page at the template level, and you can disable image output at the page level.
The module allows you to set the priority on a per-page basis (it's optional and will not be included if not set).
Lastly, a stylesheet option has also been added. You can use the default one (enabled by default), or set your own.
Note that if the module is uninstalled, any saved data on a per-page basis is removed. The same thing happens for a specific page when it is deleted after having been trashed.
I'm brand new to ProcessWire and I found it when searching for a CMS to create my web site.
The reason I'm interested is because I want to create a site which is exactly like the Skyscrapers demo site, but with different content obviously. I like how the site is formatted and the search options box, the summary list and detail pages, and the map.
What is the quickest and easiest way of setting up a page like this with my own variables, enter my own records and have it formatted just like that demo page with the menu options, sorting and search options? I've had a look at the Tutorials page, but I can't see anything this specific.
Thanks for your time & help!
Hi all, I am new to PW and building up a website for a customer and have some problems with structuring my project:
On my main.php file I have a main-tag where I wan't to echo the region called 'content'. But the problem is that the markup inside this wrapper should be variable.Example: I have a page where all the news previews are outputed like in a normal news app--> no additional markup is needed. But on "home" I want to have different sections with content -->
<section> <div class="slider"> <!--here i want to have some filtered news articles--> </div> </section> <section> <div class="news"> <!--here i want to have some news articles but with another filter--> </div> </section>
How can I realise that? It has to be like that for responsive purposes.
Is it maybe possible to create and echo regions inside the "parent region"?
Cheers and thank you for your help
I am using regions with the tag <region id="whatever"> in the _main.php file. Config file is set up as follows:
$config->useMarkupRegions = true; $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; When I use a page template that changes a region, all goes well. However, I set up the _main.php file to reflect the output for a basic page. The basic-page.php template needed no customisation so was simply as follows:
<?php namespace ProcessWire; ?> When a page with the basic-page template was output, all the <region> tags remained in the HTML, ie were not stripped.
When I added a customised region to the basic-page.php template, all the <region> tags were stripped from the output _main.php HTML.
Did I do something wrong or is this a bug?
Using ProcessWire 3.0.63 © 2017
I've configured my PW site to use regions and mostly it's fabulous. However I encountered a strange problem when appending scripts to the body tag of a template. The body tag id is "bodyTag" (duh!).
There are 3 scripts - two external and one inline. My first attempt was to append each script individually thinking they'd appear in the same order on the output:
After trying a few things, I discovered a workaround which was to wrap all the scripts into one div which is then appended to the body tag. This is OK but not ideal. I think (?), the partial is rendered in its entirety before being appended to the body tag:
Using PW 3.0.61 with both Chrome and Firefox