Skip to main content

Yuppsy template development

Purpose and portability​

Keep this skill general and self-contained. Never reference a specific source template, source page filename, source folder, original person's identity, or another template pack as evidence or as a prerequisite. Those sources may not be available in future work. Do not retain historical pack inventories, migration logs, or links to unavailable example components.

Describe reusable rules directly and use generic examples where needed. Platform-standard filenames, directory names, and public documentation links are appropriate; project-specific component IDs, selectors, assets, and page compositions must be discovered in the current workspace, not prescribed here. Inspect source material supplied for the current task when available, but do not make this skill depend on its continued availability.

Use the current workspace for implementation details and the Yuppsy template documentation for platform contracts. When source pages are supplied, use their code as the implementation baseline: copy each relevant section's markup, classes, styles, responsive layout, and interactions into its corresponding Yuppsy module as closely as the template system allows. Preserve source section order and behavior; adapt only what is needed for Yuppsy DSL, editable/dynamic fields, accessibility, or explicit user requirements. Preserve the source's classes, names, and interaction patterns instead of imposing an unrelated design.

Do not silently omit or replace source behavior, assets, or sections when they cannot be reproduced. Alert the user with the specific limitation and what will not work before choosing a materially different substitute.

Always check the relevant official Yuppsy documentation for every template task, including familiar objects and syntax; do not rely solely on this skill or existing code. If documentation is unavailable or conflicts with observed host behavior, report the limitation and verify the contract rather than guessing.

Generic text defaults​

Use generic, original text as the default for editable text fields instead of copying source-specific marketing prose. For description fields, write fresh, varied, context-appropriate placeholder copy rather than reusing the same sentence or using lorem ipsum. Do not invent factual claims, identities, credentials, legal terms, or record data; use an explicit replacement prompt for fields that require verified information, and tell the user when it must be supplied before publication. Do not add a description field solely to supply filler copy. Keep source markup, layout, assets, and behavior faithful unless the user asks to change them.

Generic URL defaults​

Use clearly fake URLs for editable destination defaults, such as http://goto.com, rather than copying a source site's, person's, or brand's real link. For email destinations, use a placeholder such as mailto:contact@example.com. Tell the user these destinations must be replaced before publication. Media assets are different: image and playable-video defaults must remain valid URLs so they render and play.

Architecture and discovery​

Yuppsy templates are host-rendered, not ordinary static HTML or a standalone application. Inspect the workspace before assuming a build command, test runner, editor integration, or local renderer exists.

Conventional locationResponsibility
FullMasterPage.htmlShared shell, metadata, assets, and composition containers.
styles/Shared stylesheets; keep font URLs relative to each stylesheet.
templates/dynamic/<ObjectType>Data-bound property and agent components, grouped by object type.
templates/static/<ObjectType>Editable content modules grouped by object type; "static" does not mean non-editable HTML.
templates/section/<ObjectType>Shared section objects such as Menu and Footer.
templateItemsAgent, Company, and Property website layout presets.
scripts/editor/scripts.jsRequired YUP editor lifecycle adapter in every template pack.
settings.jsonOptional editor grouping/settings.

Locate shared CSS, browser scripts, fonts, and images through actual references in the current pack. See File structure and Template settings.

A preset selects components by type and ID. The host supplies records and editable fields, renders shell containers, and initializes components through editor callbacks. The template pack does not implement that host.

Treat deployment configuration as sensitive. Do not copy credentials into documentation, examples, logs, or portable assets. Do not upload, remove remote registrations, or change remote settings without explicit authorization.

Registration and template language​

Use Display Name.component_id.html in a folder named for the object's Yuppsy type beneath its category, for example templates/dynamic/DirectoryList/, templates/dynamic/Property/, or templates/static/ImageListModule/. Keep each object type in its own folder. The filename's name and ID must match the outer {object:Type ...} declaration; see Filename convention. Keep existing IDs stable, including compatibility spellings. Renaming or moving a file can leave an old remote registration and requires coordinated migration.

Metadata differs by object type. Consult the matching schema rather than inventing a universal header. Display types describe replacement-compatible layouts, not object types; they are documented as ignored on single Property and DirectoryItem objects.

SyntaxMeaning
{:Field}Field in the current context.
{block:Name}...{/block:Name}Nested context or repeated items, according to the schema.
{global:Site}...{/global:Site}Global data context.
{global:Site.Title /}Self-closing global field.
{container:Content /}Host composition slot; other shell slots include Meta, Menu, and Footer.
{?:Field}...{~:Field}...{/:Field}Conditional with optional alternative.
{=:Type value="Email"}...{/:Type}Equality branch.
{~block:Name}Alternative for an enclosing block.
{:ItemNode}Editor hook on an inner editable list-item holder.
{$Join}, {/$Join}Separator between items.

Use ~root/ for host-resolved asset paths in templates and master pages, not in CSS or JavaScript. Stylesheet-relative font URLs remain ordinary URLs. Do not translate the DSL into JSX, Liquid, Handlebars, or JavaScript interpolation.

Consult Syntax, Context, and Custom properties before introducing unfamiliar fields or operators.

Contexts, operators, and custom fields​

  • Declare a named context on an enclosing object/block when descendants need to revisit it, for example {@propertyRoot:Price}. A sibling's closed context is not available. Keep shared options on a suitable enclosing context.
  • ! tests false and ? tests true. Equality supports string and numeric comparisons. Preserve balanced context, block, and conditional closing tags.
  • List helpers include $Index, $Count, $IsIndex, $Length, $Even, $Odd, $First, $Last, and $Join. $Count belongs inside the list. Verify index semantics before relying on $Every.
  • For chunking, place the chunk wrapper inside the list holder, around the actual repeating block.
  • Use documented text transforms: tolowercase, touppercase, totitlecase. Text trimming supports trimleft, trimright, and trim.
  • Math modifiers execute left to right. Validate input rather than assuming nonnumeric values produce meaningful output.
  • uniqueId reuses a generated value for the same property name within a template. Keep paired references consistent; do not assume cross-component uniqueness without checking host behavior.
  • Custom fields have distinct names. Reuse a declared value through a plain reference rather than redefining it.
  • Supported custom types include video, image, number, text, string, url, and select. Do not infer HTML/URL escaping guarantees from the type.
  • Menu and Footer objects do not support custom fields. Never use isCustom='true' or define custom properties in these objects; use only their documented native fields and global values.
  • Dynamic objects (Property, PropertyList, PropertyListSelect, DirectoryItem, DirectoryList, and DirectoryListSelect) do not support custom fields. Never use isCustom='true' in a dynamic object.
  • Use isExternalEdit='true' only on isCustom='true' fields rendered inside HTML attributes when sidebar editing is needed. Do not add it to native properties or blanket-apply it to every field. isAttribute is deprecated; do not copy conflicting editing flags.
  • Custom properties inside a repeating list are shared settings, not per-item values. Use native item fields for independently editable content.
  • For related image sizes, use separate property names with imageSize="S" and imageSize="L" and a shared imageGroupName.
  • A select field uses options="value=Label,other=Other label"; group organizes sidebar settings. Use disableRichTextEditor where appropriate.

Choosing and composing components​

  • Property: record-bound property details, galleries, amenities, maps, or agents. See Property.
  • PropertyList: host-paginated property collection. See PropertyList.
  • PropertyListSelect: manually selected properties; do not add pagination or infer a status filter from a heading. See PropertyListSelect.
  • DirectoryItem: one agent's profile, contacts, biography, and optional nested property list with pagination. See DirectoryItem.
  • DirectoryList: host-paginated agent collections. A property list nested inside an agent list has different limits and pagination capabilities from a standalone agent detail; verify the relevant schema. See DirectoryList.
  • DirectoryListSelect: manually selected agents; do not add pagination or infer a status filter from a heading. See DirectoryListSelect.
  • ImageLargeModule: one editable section, including text-only headings, banners, CTAs, and a single non-repeating testimonial, image is not required. See ImageLargeModule.
  • ImageListModule: repeated editable content, including image-free reviews and cards, using ImageListItem. See ImageListModule.
  • VideoLargeModule: one video section, including video heroes. VideoListModule is for an actual repeated video list through VideoListItem; do not use image modules to represent videos or combine independent video sections into one list. See VideoLargeModule.
  • Menu / Footer: shared sections using navigation and global data. See Menu and Footer.

Standalone section rule​

Make each independently composable page section its own registered object and place it as a sibling in the page preset; do not inline separate sections inside another object. Images do not determine the object type: repetition does.

Choose static or dynamic object type by data scope, not by appearance:

  • If content differs by property/agent record or depends on that record's context, keep it record-bound in a standalone dynamic object. Never move it into a static module merely to separate its markup; a static module is shared by every page/record that includes it.
  • Use a static module only when its content is intended to be shared at the page/module level.
  • Before composing a dynamic detail page, check the page target and preset: static siblings there are shared across all records using that page.
  • If independent ordering requires multiple dynamic objects for the same record, verify the host supports that composition before relying on it. If the object map or host cannot preserve the record context, report the exact limitation and ask before substituting shared static content.

Reviews or a repeated testimonial carousel belong in an ImageListModule when their content is shared at the module level. For record-specific reviews, use a separate record-bound object and the smallest schema-supported set of fields; never expose one record's reviews on every record's page. Both dark and light CTA variants belong in ImageLargeModules, even with no image. A single shared testimonial without ImageListItem is an ImageLargeModule. Do not add dummy images or numbered custom fields to force a module type.

Keep record-bound profile/details/listings in the relevant dynamic object. Give each independent section its own registration and styling scope so it does not depend on a sibling's wrapper. Reuse a matching object when design and behavior match; otherwise create a distinct variant.

Compose objects as siblings, not nested declarations. Update existing presets when required, but do not invent a new page simply to register an object. If a record-bound component contains multiple sections, split them when independent ordering is required and the host supports it.

Detecting repeated items in source markup​

Inspect the contents of every section before choosing its object type. Repeated sibling items are a list even when the source uses plain span, img, or article elements instead of semantic list markup. This includes press logos, media/partner names, cards, and repeated testimonials. Use an ImageListModule with one ImageListItem loop for repeated image or text items; use VideoListModule only for repeated videos within one list section. Do not model these as an ImageLargeModule with hand-written repeated elements or numbered custom fields. Conversely, keep genuinely independent sections as separate objects instead of merging them into one list.

When converting existing repeated content, account for every item's text, image, link, and order. itemCount sets the initial number of list items; it does not seed distinct per-item values. Do not replace existing entries with blank or repeated placeholders without telling the user what data needs to be transferred or entered in the editor.

Editable list loop rule​

Both {block:ImageListItem} inside {object:ImageListModule} and {block:VideoListItem} inside {object:VideoListModule} are loops, not single manually authored items. The same rules below apply to both. Write one item's markup inside one block:

{block:ImageListItem id="items" itemCount="3"}
<article>
<div {:ItemNode}>
<h3>{:Title}</h3>
<div>{:Description}</div>
</div>
</article>
{/block:ImageListItem}

For a video list, use the same structure with VideoListItem opening/closing tags inside VideoListModule. Render the native {:URL} for each item's video; the block's lowercase url attribute supplies the default video URL.

itemCount="3" supplies the default count on first rendering; it is not an index and does not force an existing saved list to contain three items. Never create three itemCount="1" blocks to represent three cards or videos. See Image list block, Video block, and Video list block.

Use native Title, SubTitle, Description, ImageS, and ImageL for per-item data, plus URL for video items. Keep the module heading outside the loop. Defaults are shared starting values; configure differing content through the editor.

Use separate block IDs only for genuinely independent lists. Preserve existing list identity when consolidating markup. Changing IDs, object types, or fields does not migrate saved values: explicitly arrange any necessary manual transfer.

Keep {:ItemNode} on an inner holder, not the outer slide node retained by carousel logic. isCircular controls editor reordering, not browser wraparound. Test adding the first item, removing the last, and empty/single/multiple lists. Never invent testimonials; hide empty review sections when appropriate.

Dynamic records and contacts​

Treat each dynamic object map as the authoritative contract for its fields, blocks, and attributes. Before editing a file under templates/dynamic/, check the matching official map:

Use the exact documented native field names and nesting; do not invent aliases or custom fields in dynamic objects. For example, a property video uses the documented FeaturedVideo and FeaturedVideoMimeType fields, not a custom PropertyVideo field. Prefer native values for semantically equivalent content, but do not repurpose an unrelated field. If the map cannot represent a source feature, do not add a custom field; report the limitation.

Preserve native data fields and nesting rather than substituting custom copies. Verify unfamiliar fields against the relevant object schema.

  • Property cards commonly use FeaturedImageS, FeaturedImageTitle, ItemUrl, Price, Bedroom, Bathroom, LivingSize, and nested Location.
  • Property maps include FeaturedVideo and FeaturedVideoMimeType, as well as PropertyImages/Image/UriL and PropertyVideos/Video/Uri. Mixed Media/MediaItem and story media have separate schemas; do not treat video URLs as image URLs.
  • Agent fields include ImageS, ImageL, FirstName, LastName, Title, and About. Contacts use Contact/ContactItem with Type, Name, Contact; social links use SocialMedia/SocialMediaItem with Type, Url.
  • Do not add office or license custom fields to dynamic records. Use documented contact entries when appropriate; otherwise report the unsupported field. Never hardcode a source person's identity or contacts.
  • Keep pagination inside its collection context. pageSize controls record count; Pages length controls page-link count. Use host URLs and current-page state rather than fabricating routing.

For standalone phone/email CTAs use documented global contacts, not duplicate custom fields or assumed access to a sibling DirectoryItem. Global contacts belong to the company, or to the agent on an agent website; they do not follow an arbitrary selected directory agent on a Company website. Do not render links for empty contact values.

Preserve real record images and honest missing-image states. Stock people must not be presented as actual agents, nor stock buildings as actual listings. Use approved review content and verify attribution when reusing modules.

Default image sources​

Use live, fixed https://images.unsplash.com/photo-... URLs for default stock photography, including editable images and component/menu backgrounds. Keep native record bindings and user-selected images intact. Changing defaults does not replace saved values.

  • Find suitable photos on Unsplash and verify the photo page offers the free Unsplash License. Do not assume Unsplash+ or sponsored images are free.
  • Use the actual CDN URL, not a photo-page URL, random/search endpoint, invented identifier, or deprecated source.unsplash.com URL.
  • Large defaults can use ?auto=format&fit=crop&w=1920&q=80; adjust crop and size for the design.
  • Use accurate alt text, or empty alt text for decorative imagery.
  • Prefer configured branding or site-title text over copied source logos, guide covers, and awards. Required compliance marks are not stock photos: preserve appropriate approved assets and verify their availability.
  • Verify HTTP status, image content type, browser loading, and host editing of remote URLs. Do not add credentials, download stock copies, or silently fall back to unavailable local assets.
  • Leave unrelated existing files untouched. Rendered catalog thumbnails are the deliberate local-image exception described below.

Images belong in components, not CSS files​

Keep all image URLs out of .css, including remote/local photos, SVG/data-image URLs, masks, and image-valued custom-property definitions.

Declare images in component markup through native image fields or custom type='image' fields. Use isExternalEdit='true' only for custom image fields rendered in HTML attributes when sidebar editing is needed; do not add it to all image properties or fields. Use template-backed <img> sources, editable inline backgrounds, or image-valued CSS variables defined on the component. Responsive stylesheet rules may select those variables but must not contain image URLs or defaults.

CSS retains positioning, sizing, colors, gradients, variable references, font URLs, and stylesheet imports. Render required inline SVG icons in their owning components. Keep compliance images in markup as well.

Preserve responsive image choices through editable fields. Check all stylesheet overrides and verify independent image editing at mobile, desktop, and wide viewports.

Rendered catalog thumbnails​

Every component thumbnail must depict the rendered component, not an unrelated stock photo. Use local optimized previews, conventionally ~root/images/thumbs/<component_id>.jpg, and matching preset Thumbs references. Preset previews should show the composed page, including navigation and hero.

  • Preview a template component at https://yuppsy.com/Admin/DevTemplateComponentPreview/XXX@YYY@ZZZ/, where XXX is the template head ID, YYY is the object type, and ZZZ is the object ID. Ask the user for the template head ID if it is not known.
  • This preview page requires authorization. Send a Bearer token in the Authorization header using an authorized, transient credential source. Never write, log, or include the token in the skill, template files, URLs, or generated artifacts.
  • Render with the current shared CSS/scripts and representative fixture records. Use fictitious names/addresses and neutral agent imagery, not private records. Fixture data must not become production defaults.
  • Use a 1440px desktop viewport and save optimized 720px-wide JPEGs, preserving aspect ratio. Frame the screenshot around the rendered component with modest padding; hide or crop browser scrollbars and remove blank viewport margins without cutting off component content. For a page preset, capture the first 900px rather than shrinking the entire page.
  • Wait for fonts and foreground/background images. Initialize relevant interactions before capture.
  • Check unresolved DSL, broken assets, overflow, duplicate previews, dimensions, and registered paths. Do not hide missing production assets by silently substituting files from an external source pack.
  • Re-render after significant markup or styling changes. Keep thumbnail names and registration references synchronized.
  • Local fixture renders cannot certify host output. Verify catalog display in Yuppsy and report any remaining host or live-asset limitations.
  • Clean up temporary capture tools, browser profiles, and fixture servers.

Layout presets and migration​

Presets under templateItems describe pages and component selections, not property/agent records. Match each ComponentId to its registration and ComponentType to the object type. Keep existing ordering unless asked to change it. Check PropertyPageTarget and AgentPageTarget against actual host targets. Do not assume preset names guarantee public URL slugs.

See Components, Pages, and Website structure.

IsHidden hides navigation, not access. IsNonClick disables a menu link. Nested Pages create child pages. Preserve working Menu/Footer selection conventions and verify host behavior if documentation examples differ.

Adding a catalog component does not automatically select it in a preset. Changing a component does not update independent variants with similar content. Inspect directly dependent selections and siblings before modifying them.

Type changes, list consolidation, extracted sections, and renamed fields can require explicit saved-data migration. Coordinate obsolete remote-registration cleanup only during authorized deployment.

Browser behavior and editor lifecycle​

Use existing shared scripts and selectors rather than assuming a particular initializer name or carousel library. Trace markup, styles, and behavior together.

The editor contract uses the YUP adapter. Always include scripts/editor/scripts.js when creating a template pack; do not omit it just because the template currently has no custom interactions. Connect its page-load and Content, Menu, and Footer lifecycle callbacks to the shared runtime's window.yup_template.init(root) and window.yup_template.dispose(root) methods. If no component needs lifecycle work, provide safe no-op runtime methods rather than leaving the adapter without its API. Scope initialization to the supplied element and relevant interactive ancestor; avoid whole-page initialization during edits. Handle nested list lifecycles where applicable. Always complete host callbacks, including when initialization throws.

  • Reinitialization must not duplicate listeners, observers, generated nodes, or controllers. Dispose prior same-node resources before registering again.
  • WeakMap keys use exact DOM identity. A replacement element is a new key; missing cleanup on first initialization is normal. Do not substitute IDs to conceal replacement-node lifecycle issues.
  • Multiple onItemInit calls may come from separate host renders. Trace actual call stacks and render paths; do not assume duplicated listeners or confuse asynchronous ancestry with repeated execution.
  • Never skip every second callback to mask a host problem. Any host render change must preserve reset-to-default semantics and multiple-instance behavior.
  • Keep outer slide nodes stable and editor hooks on inner holders. Test counters, disabled states, observer cleanup, empty/single lists, and independent instances.
  • Preserve keyboard controls, focus behavior, Escape handling, and reduced-motion needs. Avoid unpausable automatic rotation.
  • Validate calculator input and report invalid values. Do not simulate successful form submission, subscription, appointment booking, or consent without backing behavior.

BaseNode can position editor menus. ItemNode marks replaceable item content. ignore-view-url opts links out of editor rewriting; use it only when intended.

Working procedure and validation​

  1. Classify the change: markup, data fields, composition, styling, interaction, editor lifecycle, or thumbnails.
  2. Locate the current registration and dependent preset selections. Read the nearest applicable implementation, not an unavailable historical example.
  3. Trace contexts, images, selectors, and shared hooks. Consult documentation for new fields or uncertain semantics.
  4. Make the smallest coordinated change while preserving existing identifiers, behavior, and user edits. Update directly related guidance without adding source-specific references to this skill.
  5. Run targeted existing checks and verify the requested outcome.
  • Documentation-only edits need no application build.
  • Syntax-check changed JavaScript with node --check <script-path> when Node is available. Use existing lint/test commands if the workspace provides them.
  • Parse changed JSON with PowerShell: Get-Content -LiteralPath <path> -Raw | ConvertFrom-Json -ErrorAction Stop. Check component IDs, types, and page targets separately.
  • Check paired DSL tags, editable-field metadata, image references, thumbnail files, and selector consistency. Generic HTML parsing is not DSL validation.
  • Test affected desktop/mobile layouts, keyboard/pointer controls, empty and populated records, missing images, multiple instances, and editor insertion/reordering/duplication/removal/reinitialization.
  • Static serving does not resolve DSL or ~root. Fixtures can test browser behavior but not CMS escaping, saved editor values, routing, or rendering.
  • Verify in the actual host when available. Otherwise state the limitation; do not claim an end-to-end pass or invent a local renderer/build command.

Finish with the changed files, verified outcomes, and remaining limitations. Do not imply deployment occurred unless it was explicitly authorized and done.