Ivo

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Ivo

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,006 profile views
  1. Ivo

    My Apologies, I got the module mixed up with TextformatterSrcset.
  2. Ivo

    Thanks for the update, Something to possible consider - maybe a field in the module settings where the user can type in the url segment to identify that the page is an AMP page and from there replace the <img> tage with the <amp img ></amp> tag?
  3. Hi BitPoet, I tried to output $input->get->id but nothing populated on the live site, but works on my localhost (which uses .htaccess as opposed to web.config on the live site).
  4. Hi BitPoet, The code is in the _main.php template so it's executed on every page.
  5. Hi Folks, my input string which I wish ot place into Snipcart's cart object doesnt work on the homepage url (site is HTTPS) https://ancientlakesmagnesium.com.au/?id=1297&src=facebook The query string works on the sub pages though? My code is as follows.. <?php if($input->get->id) { $affID = $input->get->id; $affiliateId = $pages->get("template=affiliate,id=$affID, include=hidden"); if($affiliateId != '') { $linkaff= $input->get->src; echo "<script> Snipcart.subscribe('cart.ready', function() { Snipcart.api.cart.start() .then(function (cart) { Snipcart.api.cart.metadata({ 'trackingID': '{$affiliateId->title}', 'trackingSrc': '{$linkaff}', 'trackingLandingPage': '{$page->httpUrl}', 'trackingReferrer': '{$_SERVER['HTTP_REFERER']}' }); console.log (cart); }); }); </script>"; } } ?> The site is on IIS and the Web host created a web.config file as follows <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled="false" /> <rewrite> <rules> <clear /> <rule name="Remove WWW" stopProcessing="true"> <match url="^(.*)$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> </conditions> <action type="Redirect" url="http://ancientlakesmagnesium.com.au{PATH_INFO}" /> </rule> <rule name="Redirect to HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> </rule> <rule name="Handle request for missing favicon.ico" stopProcessing="true"> <match url="favicon\.ico" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="The requested file favicon.ico was not found" statusDescription="The requested file favicon.ico was not found" /> </rule> <rule name="Handle request for missing robots.txt" stopProcessing="true"> <match url="robots\.txt" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="The requested file robots.txt was not found" statusDescription="The requested file robots.txt was not found" /> </rule> <rule name="Access Restrictions: Keep web users out of directories"> <match url="(^|/)\." ignoreCase="false" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> <rule name="Access Restrictions: Protect ProcessWire system files" stopProcessing="true"> <match url="^.*$" ignoreCase="false" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{URL}" pattern="(^|/)site/assets/(cache|logs|backups|sessions|config|install)($|/.*$)" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/install($|/.*$)" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/config\.php$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)(wire|site)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/templates($|/|/.*\.(php|html?|tpl|inc))$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/assets($|/|/.*\.php)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)wire/(core|modules)/.*\.(php|inc|tpl|module)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/modules/.*\.(php|inc|tpl|module)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)(COPYRIGHT|INSTALL|README|htaccess)\.txt$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site-default/" ignoreCase="false" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> <rule name="ProcessWire Rewrite" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{URL}" pattern="^/~?[-_.a-zA-Z0-9/]*$" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" pattern="(favicon\.ico|robots\.txt)" ignoreCase="false" negate="true" /> <add input="{URL}" pattern="\.(gif|jpg|png|ico)$" negate="true" /> </conditions> <action type="Rewrite" url="index.php?it={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" path="/index.php" responseMode="ExecuteURL" /> </httpErrors> <defaultDocument> <files> <clear /> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration> The code seems to work on local host WAMP (on http not https) on the front page, does anyone know if its the web.config file that's stopp PW seeing the input query string? Thanks, Ivo
  6. Hi All, Is there a simple way to add a pagination page limit or total item count limit to a pagination? It's for a recipe site (latest recipes) where I would like to limit the total item count to say 24 or 4 paginated pages of 6 items. Code is as follows ($page->latest set to 6) $items = $pages->find("template=recipe, limit=$page->latest, sort=-modified"); $pagination = $items->renderPager(); foreach ($items as $item) { display recipe..etc... } I tried truncating the $items array but to no avail. cheers, Ivo
  7. Hi Jean, Thank you for your answer, but I may have worded the question in an obscure way. What I would like to know is my multi select page array (field of page type) called "body_type" which access page templates called "body" - each "body" template has the title "sedan", "wagon", etc. I would like these body types to be displayed in the admin list on the page tree next to the page title (which is the car model). If I add in the text "Body_type" in Lists of fields to display in admin list - in the advanced settings of the template that my field "Body_type" is in, I get a pipe string of the page id's ie "1021 | 1022 |1023", and if I use dot notation, such as "body_type.title" it only displays the first page's title "Sedan" - ie first item in the array - not the entire array. I have tried different permutations, but to no avail. I was wondering if we can display the titles to the pages in the whole array using dot notation or similar that is compatible with that feature? So instead of getting Holden Commodore 2013 1021 | 1022 | 1023 or Holden Commodore 2013 Sedan I would get all selected body types displayed like Holden Commodore 2013 Sedan Wagon 2 Door Coupe I hope that makes sense? cheers, Ivo
  8. Hello Everyone, I am creating a database for vehicle audio components and am having issues displaying a page array of filed Page type in the "List of fields to display in the Admin Page List " field of the template. For a particular car model, I need the user to be able to select multiple vehicle body types (ie. sedan, wagon, etc) for each vehicle model - I have created a pages for each body type (via a unique template) which the user can select via a multi select field of Page type (via Template of selectable pages). I need these body types to be displayed in the admin page list, but it doesn't seem to be able to display multi page arrays of field Page type? So my questions are. a) is this possible and if so b) what is the correct syntax to achieve this? Thanks. Cheers, Ivo