I have a list of Tridion page URL's in an excel sheet, which should be unpublished on Click of a button for which I am developing a custom page. How do I read the URL from the publication.? For example, the URL looks like "https://www.example.com/us/en/abc/cde/index.html" (us/en - country/language; abc- folder in structure group, cde- subfolder in abc, index.html is the page) Now index.html should be unpublished.
How to Read the Tridion Page URL from the publication using Core Services?
118 views Asked by hulda.rachel At
1
There are 1 answers
Related Questions in TRIDION
- Tridion: Not able to copy paste the items in lower environment
- Tridion and SOLR Configuration
- How to Read the Tridion Page URL from the publication using Core Services?
- C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component
- can not sort on a field w/o docValues unless it is indexed=true uninvertible=true and the type supports Uninversion
- Problem with content unpublish in Tridion 2013 SP1 HR1
- Is there a function to get the unpublish info of a page in Tridion CoreService?
- Tridion Web 8.5: Can't copy and paste component
- Can't access XML node using xpath (namepace issue?)
- Deployer extension to fetch component fields in tridion
- item '/system/config/_all.json' not found for Localization '94'
- Tridion RTF Issue
- How can I check component/page is published to which target?
- Parent Publication option is not shwoing
- Update preview is not working as expected - Tridion 2013sp1hr1
Related Questions in TRIDION-CORE-SERVICES
- How to Read the Tridion Page URL from the publication using Core Services?
- Is there a function to get the unpublish info of a page in Tridion CoreService?
- How to recreate a WCF Service as Singleton instance with SimpleInjector (using Tridion)
- Preventing special characters in tridion component field and changes in schema
- How to start 2660 port in IIS for Tridion Core Service connection using netTcp
- Migration : if content migrated from tridion r5.XX to 2011?
- How can we provide the path for the image file in order to create the multimedia component in server?
- How to retrieve a PDF(document) from the Tridion File System and create a multimedia component out of it
- How to update a PDF without creating a new PDF?
- Error: Could not find default endpoint element that references contract
- Tridion Core Service Reference becomes unknown after I 'Update' the service reference in VS 2010
- How to get TCM URI of a category for KeywordFieldDefinitionData type fields?
- Error connecting Tridion with different user
- Getting error in Tridion while accessing core services
- Getting Access is denied for the user NT AUTHORITY\NETWORK SERVICE.while accessing coreservice Tridion
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
If I understand you correctly, you have the URL of a page and you want to find the corresponding page in Tridion. First the bad news: The core service (the CM API) does not support a 'find by url'. The quick and dirty approach would be to use the CD API to retrieve the page. This will give you Page back which has an ID property. You can then use the core service to unpublish the page.
You can also do it with a pure core service approach but it's a bit more work and it's slow. It goes like this:
Start from the top level directory (in your example 'us')
List all structure groups inside the root using a filter like this:
var filter = new OrganizationalItemItemsFilterData() { ItemTypes = new ItemType[] { ItemType.Page }, IncludePathColumn = true };
Use Linq to find the one with the top-level directory you're after
Move to the next directory and repeat with the child structure group you found