---
schema_version: "1"
id: 0524dc91d9035e3930de60cc3865a5b1cee5672b93fb04da06f86a58fea3de5a
title: forResource(resourceName, path)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_System_PageReference_forResource.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_System_PageReference_forResource.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c8689148a809730f98b51af47a098868370c21c541f2a8646054b316fe65da3d
description: Create a PageReference for nested content inside a zip static resource, by name and path.
---
# forResource(resourceName, path)

Create a PageReference for nested content inside a zip static resource, by name and path.

## Signature

public static System.PageReference forResource(String resourceName, String path)

## Parameters

- **resourceName**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.") The resource name
- **path**: Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.") The resource path

## Return Value

Type: [System.PageReference](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_system_pagereference.htm "A PageReference is a reference to an instantiation of a page. Among other attributes, PageReferences consist of a URL and a set of query parameter names and values.")