Jump to content

Search the Community

Showing results for tags 'view'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 6 results

  1. hey there, i stumbled about a pretty odd problem (at least i think it's odd). i was building a site on my local machine, everything worked just fine. after migrating the page to an actual server most of the parts still worked. only all of my childpages where gone. they are still available and editable in the backend but i can't access them in the browser. even the »view«-button is missing. i already had a similar issue while working local: the site is a multi-language site and is use a form to create the childpages via the api. but i could fix it by adding a dedicated status to the newly created pages: $p->addStatus(Page::statusHidden); for the migration i uploaded my local processwire folder via ftp. edited the site/config.php (httpHosts) exported the local sql imported the sql backup to the new server this strange behaviour also applies for newly created pages on the live server. did i somehow mess up the migration – is it a bug – how do i fix it? thanks in advance for any tip!
  2. I pushed an initial (testing) version of TemplateFileHelper to bitbucket. https://bitbucket.org/pwFoo/templatefilehelper/src/ The autoload module extends TemplateFile instances with API vars $layout and $view $layout -> global layout instance of TemplateFile to set layout placeholders ($layout->set(...) or global scripts / styles. $view -> current page instance of TemplateFile to set the current page placeholders and current page scripts / styles. load() method Load a template / view with additional controller (php) file as subTemplate. Returns a TemplateFile object to render / output Each sub-template controller have access to API Vars and $subTemplate (current TemplateFile instance, $subTemplate->set('placeholder', 'My value...')). Load site/templates/chunks/test1.php controller and site/templates/chunks/test1.tpl view: $part = $view->load('chunks/test1'); echo $part->render(); chunks/test1 example <?php // chunks/test1.php - controller $subTemplate->set('var1', "Subtemplate variable output..."); <!-- chunks/test1.tpl - view --> <div><?=$var1?></div> scripts / styles properties FilenameArray like $config->styles | scripts. It should help to organize scripts / styles with ajax in mind (global / current page only). // current page script $view->scripts->add('js-file.js'); // global / layout script $layout->scripts->add('js-file.js'); You have to handle the output yourself by two foreach loops inside your _layout.php / _layout.tpl files (non ajax calls scripts and styles should be in layout head section). foreach ($layout->scripts as $globalScript) { ... } foreach ($view->scripts as $currentPageScript) { ... } IntercoolerJS module will take care about async / ajax handling of (custom page) scripts and styles. hook Page::render hook after page render to load and add the global layout. The current page template (PW template file == controller) just handle the currents page code / view. Global layout / controller / view is moved to separate files (default: _layout.php controller and _layout.tpl view). Just use $layout->set(...) to fill the _layout.tpl placeholder variables inside the _layout.php controller file. configurable module Some settings are available... Global layout (view + controller) file name (default: "_layout") Current page content variable (used inside of the _layout.tpl view to output current page content, default: "currentPageContent") View file extension (default: ".tpl") Controller file extension (default: ".php") It will be a dependency of the planned IntercoolerJS module which adds ajax page calls, async scripts / styles handling (current page scripts and styles...) and need a defined template handling to work...
  3. Ahoy captain! I need to hook into 2 areas of ProcessWire: - "view" page link on page tree - "view" page link on page edit (Are there more areas with these "view" links for pages or did I get everyone?) How can I hook into that in order to change the "view" link url? Arrr! It would be great if someone would help me with that! – Pirate GlassedEyes
  4. Greets Right, so I'm nearly done with my first PW site, and now need to move it to a testing server, which uses a different domain. (Sure, this question could apply to moving a site from dev to production too...) The move was successful, but the "View" tab/button (dependant on the admin theme - hehe) links to the old domain... Didn't realise that the domain would be hard coded into each DB entry... The rest of PW uses a relative approach. How could I change this? (Or have I done something really silly, which I doubt?)
  5. I'm building a template for a one page website and have run into a small problem with the admin view page links. Because my site is built with content blocks rather than pages there is no header and footer for each block, only the homepage needs to pull in the header and footer for the site. As a result clicking to view a page in the admin shows the page content but with zero styling. This is obviously not ideal for clients so I'd like to find a better solution. Here's a rough idea of the site structure: Home (header & footer) Page 1 Content Block 1 Content Block 2 Page 2 Content Block 3 etc etc My page's use an anchor # for the url eg #contact so Ideally when the user clicks on the page they'd be redirected to that relevant anchor. I know this might be complicated to achieve so all I really need to do is redirect all pages to the homepage (parent). Any idea how I would go about this?
  6. Hi all, I know that every template has its file associated for rendering the page. But i wonder if i can change file in a page that require a different visualization without create another template. Is that possbile ? ADB
×
×
  • Create New...